Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

Simple TCP 'RAT' Using Winsock.

Just started learning Winsock and I thought a RAT would be a nice project. The thing is the client does not execute commands like "dir" or "whoami" but will run commands that open processes such as Notepad. Take a look my  code:TCP Client Help - Pastebin.com and please tell me what I'm doing wrong and how I can have this working as intended. Also any pointers on how I can add to this program's functionality would be greatly appreciated. 🤝
send and recv don't garuntee to send the full amount also I doubt your command is 2048 bytes so..yah check for that
you need to send cmd /c and the string command or in the client add it at the begining of cmd
/C Carries out the command specified by string and then terminates
so send cmd /c dir and it will work
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
I'd say learn C, dump windows, lean mirai source code and see you on the dark side of moon
(Nov 12, 2019 11:57 AM)ModernJS Wrote:  I'd say learn C, dump windows, lean mirai source code  and see  you on the dark side of moon

Mirai is the most retarded shit ever written. Dump windows? Why? Because it has a better networking model than select/epoll? You're dense
(Nov 12, 2019 07:05 PM)YouthInAsia Wrote:  Mirai is the most retarded Clay Davis ever written. Dump windows? Why? Because it has a better networking model than select/epoll? You're dense

I'm biased yes. But there's no point in messing and understanding private closed source libraries from microsoft. I love open source. Just my 2 cents. You maybe right.
Instead of using send and recv to return and run commands use redirected handles. Firstly create your socket using WSASocket. Finally create a command prompt process and redirect it's input, output and stderr to the handle.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Legends] by HackersJan 17, 2026 04:24 PM 20 818 Jan 17, 2026 04:24 PM
Last Post: Hackers
[C] by gurlhackerclubAug 31, 2020 09:34 PM 0 185 Aug 31, 2020 09:34 PM
Last Post: gurlhackerclub
[C] by ʇsıʎqqoɥJan 2, 2020 05:33 PM 5 553 Jan 2, 2020 05:33 PM
Last Post: akali