资源简介
瑞士军刀,经典之作,网络安全必备软件,源码奉上!

代码片段和文件信息
// for license see license.txt
// Modified 12/27/2004 by Chris Wysopal
// fixed vulnerability found by hat-squad
// portions Copyright (C) 1994 Nathaniel W. Mishkin
// code taken from rlogind.exe
#include
#include
#include se.h>
#ifdef GAPING_SECURITY_HOLE
#define BUFFER_SIZE 200
extern char * pr00gie;
void holler(char * str char * p1 char * p2 char * p3 char * p4 char * p5 char * p6);
char smbuff[20];
//
// Structure used to describe each session
//
typedef struct {
//
// These fields are filled in at session creation time
//
HANDLE ReadPipeHandle; // Handle to shell stdout pipe
HANDLE WritePipeHandle; // Handle to shell stdin pipe
HANDLE ProcessHandle; // Handle to shell process
//
//
// These fields are filled in at session connect time and are only
// valid when the session is connected
//
SOCKET ClientSocket;
HANDLE ReadShellThreadHandle; // Handle to session shell-read thread
HANDLE WriteShellThreadHandle; // Handle to session shell-read thread
} SESSION_DATA *PSESSION_DATA;
//
// Private prototypes
//
static HANDLE
StartShell(
HANDLE StdinPipeHandle
HANDLE StdoutPipeHandle
);
static VOID
SessionReadShellThreadFn(
LPVOID Parameter
);
static VOID
SessionWriteShellThreadFn(
LPVOID Parameter
);
// **********************************************************************
//
// CreateSession
//
// Creates a new session. Involves creating the shell process and establishing
// pipes for communication with it.
//
// Returns a handle to the session or NULL on failure.
//
static PSESSION_DATA
CreateSession(
VOID
)
{
PSESSION_DATA Session = NULL;
BOOL Result;
SECURITY_ATTRIBUTES SecurityAttributes;
HANDLE ShellStdinPipe = NULL;
HANDLE ShellStdoutPipe = NULL;
//
// Allocate space for the session data
//
Session = (PSESSION_DATA) malloc(sizeof(SESSION_DATA));
if (Session == NULL) {
return(NULL);
}
//
// Reset fields in preparation for failure
//
Session->ReadPipeHandle = NULL;
Session->WritePipeHandle = NULL;
//
// Create the I/O pipes for the shell
//
SecurityAttributes.nLength = sizeof(SecurityAttributes);
SecurityAttributes.lpSecurityDescriptor = NULL; // Use default ACL
SecurityAttributes.bInheritHandle = TRUE; // Shell will inherit handles
Result = CreatePipe(&Session->ReadPipeHandle &ShellStdoutPipe
&SecurityAttributes 0);
if (!Result) {
holler(“Failed to create shell stdout pipe error = %s“
itoa(GetLastError() smbuff 10) NULL NULL NULL NULL NULL);
goto Failure;
}
Result = CreatePipe(&ShellStdinPipe &Session->WritePipeHandle
&SecurityAttributes 0);
if (!Result) {
holler(“Failed to create shell stdin pipe error = %s“
it
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12166 2004-12-28 11:23 瑞士军刀NC源代码\doexec.c
文件 7283 1996-07-09 16:01 瑞士军刀NC源代码\generic.h
文件 22784 1996-11-06 22:40 瑞士军刀NC源代码\getopt.c
文件 4765 1994-11-03 19:07 瑞士军刀NC源代码\getopt.h
文件 61780 1998-02-06 15:50 瑞士军刀NC源代码\hobbit.txt
文件 18009 2004-12-27 17:37 瑞士军刀NC源代码\license.txt
文件 544 1997-11-28 14:36 瑞士军刀NC源代码\makefile
文件 61440 2004-12-29 13:07 瑞士军刀NC源代码\nc.exe
文件 69662 2004-12-29 13:07 瑞士军刀NC源代码\netcat.c
文件 6833 2004-12-27 17:44 瑞士军刀NC源代码\readme.txt
目录 0 2006-03-31 10:19 瑞士军刀NC源代码
----------- --------- ---------- ----- ----
265266 11
- 上一篇:软件体系结构复习题
- 下一篇:光立方Keil C51音乐频谱FFT处理源代码
相关资源
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- concept2.6无需安装1
- HAP_Advanced_PDF_Password_Recovery 5.05
- Uninstall_Cortana_WINCLIENT.CN.rar
- VNCX
- dotnet 写字板 实验 源代码 不好请要不
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- linux应用层的华容道游戏源代码
- 网上拍卖系统完整源代码
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- WinCE下CP210x的驱动程序
- DXperienceUniversal 10.1.6(2010年8月13日版
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- STM32F103 串口程序(完整版)
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- 透明加密源码及说明
- 排队机叫号 源代码
- 五子棋C 源代码
- CAD LISP24个源代码
- 二叉树基本操作源代码
- 推箱子及人工智能寻路C 源代码
- opengl轮廓字体源代码
- 冈萨雷斯 数字图像处理 源代码(m文
- 直流伺服电机电路原理图(内附单片
- 哈哈冒险岛登入器源代码
评论
共有 条评论