| Author |
How do I spawn a shell with c++ winsock on xp? |
beetleflux
Member
Posts: 22
Location: Sweden
Joined: 23.04.05 Rank: Wiseman Warn Level: 40
|
|
|
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. |
|
| Author |
RE: How do I spawn a shell with c++ winsock on xp? |
wolfmankurd
Member

Posts: 1519
Location: UK
Joined: 30.05.05 Rank: God |
|
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)
BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.

|
|
| Author |
RE: How do I spawn a shell with c++ winsock on xp? |
Mr_Cheese
HBH Owner

Posts: 2468
Location: Brighton, UK
Joined: 30.11.04 Rank: God |
|
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.
|
|
| Author |
RE: How do I spawn a shell with c++ winsock on xp? |
wolfmankurd
Member

Posts: 1519
Location: UK
Joined: 30.05.05 Rank: God |
|
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
BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.

|
|
| Author |
RE: How do I spawn a shell with c++ winsock on xp? |
beetleflux
Member
Posts: 22
Location: Sweden
Joined: 23.04.05 Rank: Wiseman Warn Level: 40
|
|
|
Okey I got it, createpipe() and createprocess(), I didnt quite understand the code, but it works. Maybe someone can explain those functions ? |
|