Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

How do I spawn a shell with c++ winsock on xp?


ghost's Avatar
0 0

I think system(recvbuf) is a bit primitive way of remotely executing commands, how can I spawn a shell with c++? I want it to be like I just have to connect, enter password, and the cmd will pop up, so it would seem as im actually on the other computer. I have the code for the client and the server, its just the shell spawning concept im unfamiliar with.


ghost's Avatar
0 0

you need to make a socket, ot make it listen on a port, then open cmd when a connection is made, I know of someone who used c++ to install netcat and crete a listener using c/c++ (idlk which)


Mr_Cheese's Avatar
0 1

i'd download and read the netcat source code.

its open source and has a feature to spawn a remote shell when connected to. so might be worth a look.


ghost's Avatar
0 0

a difficult way but one which you could run on many people would be to make a http listener on your pc with exploits and as people connect it exploits them and spawns a shell


ghost's Avatar
0 0

Okey I got it, createpipe() and createprocess(), I didnt quite understand the code, but it works. Maybe someone can explain those functions ?