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. 🤝
|
C
Simple TCP 'RAT' Using Winsock. |
|
Nov 12, 2019 08:47 AM
(This post was last modified: Nov 12, 2019 09:28 AM by HFDone.)
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 Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(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.
Nov 16, 2019 03:58 PM
(This post was last modified: Nov 16, 2019 04:00 PM by incognito04.)
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.
|
|
|

