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

C 

Windows Reverse Shell Source Code

Hey guys,
I'm trying to implement the simplest and shortest CPP Reverse Shell Code (no evasion methods or anything) withing a code of mine for educational purposes about AVs.
I'm new to CPP and trying to learn it the hard way, but couldn't find anything that can help me.

Can someone help me with it? Or direct me to a source code that can be found somewhere?

Thanks upfront :)
http://sh3llc0d3r.com/windows-reverse-shell-shellcode-i
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Aug 1, 2018 04:04 AM)HFDone Wrote:  http://sh3llc0d3r.com/windows-reverse-shell-shellcode-i

Thanks mate, Ive seen it already but he said it only works on Windows 7, I'm looking for something that's version independent :/
you said you want cpp code
asm (not hardcoded addresses) http://ly0n.me/2015/08/29/windows-revers...-shellcode
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Aug 1, 2018 06:08 AM)HFDone Wrote:  you said you want cpp code
asm (not hardcoded addresses) http://ly0n.me/2015/08/29/windows-revers...-shellcode

Hmm apparently I don't understand what it means then, can you explain what hardcoded addresses mean? Isn't there a CPP code that works on all Windows versions?
as you can see in the first link theres c code and assembly code at the bottom
to use the c code you compile it to exe and run it on the victim any win os then you can connect to its ip and send commands
shellcode means asm bytes code you code the reverse shell in asm so you can convert it to shellcode
the problem with shellcode is the api calls which their address is different for each win os
this is the different between the asm code in the first link and the second
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Aug 1, 2018 07:19 AM)HFDone Wrote:  as you can see in the first link theres c code and assembly code at the bottom
to use the c code you compile it to exe and run it on the victim any win os then you can connect to its ip and send commands
shellcode means asm bytes code you code the reverse shell in asm so you can convert it to shellcode
the problem with shellcode is the api calls which their address is different for each win os
this is the different between the asm code in the first link and the second

Thanks for the explanation but I don't really get what shellcode means.. is it like a programming language?
And is it possible writing a Reverse-Shell with CPP that will run on all Windows versions?
https://en.wikipedia.org/wiki/Shellcode
you can but you will need to convert it to asm and then to shellcode bytes see the first link
the different is that to get it to work on all win os you need to loop through the dlls and the api calls address see the second link
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by SIM-5420967Jan 17, 2024 11:28 AM 2 415 Jan 17, 2024 11:28 AM
Last Post: SIM-5420967
[Shell] by mk_0Mar 3, 2022 08:43 AM 0 206 Mar 3, 2022 08:43 AM
Last Post: mk_0
[Shell] by mk_0Mar 1, 2022 05:40 PM 4 298 Mar 1, 2022 05:40 PM
Last Post: mk_0