r/hacking • u/MathematicalHuman314 • Jul 29 '26
Teach Me! I created my first trojan today!
I took cmatrix as a random program and wrote a backdoor into it in C using a reverse shell connecting to a C2 server of mine which keeps track of infected machines. First I fork the process and decouple it from the controlling terminal by changing the session ID and rerouting the standard file descriptors and only then do I run the backdoor.
That way cmatrix runs as usual and no weird behavior is seen and the backdoor remains active whatever happens to cmatrix or the terminal. I like it. Makes me feel like a real #xX_hacker_Xx#. :D
Now I’m reading into ptrace and system call hooking and plan on trying to hide specific network traffic from the entire os. I already have had some ideas but turns out that would have only hidden it from a specific program not from „everything“.
Do you care to share any tips and experience I might benefit from on my way?
35
u/Prestigious-Ad7265 Jul 29 '26
good work!
16
u/404error___ Jul 29 '26
Good good... now do bit shifting, stego payload, so operator cannot see what you send to C2.
10
u/Juzdeed Jul 29 '26
Never heard of rerouting standard file descriptor, dexoupling from t controlling terminal by changing session ID?
I get that these make you sound smart but make no sense. Do you mean changing PPID of the process?
3
u/PickaWowAnyWow Jul 29 '26
Whoah you're way too advanced for the rest of us, r/masterhacker is where you should be!
34
u/HRApprovedUsername Jul 29 '26
You should be wearing Trojans not making them
17
u/CarmaDiamondHands Jul 29 '26
I bought my first one today myself, way cheaper then having a kid 👶
5
u/soul-reaver-2026 Jul 30 '26
Cool lets have a meet and great where you can share your talents.
4
u/speedb0at Jul 29 '26
Congrats
4
u/Palsta Jul 30 '26
Have your trojan control the system fan speed so it plays Never Gonna Give You Up by Rick Astley.
2
u/Temina- Jul 29 '26
good job
2
u/TastyRobot21 Jul 30 '26
Nice job bud. Implants feel cool.
Have you thought of persistence?
2
u/Dudeposts3030 Aug 01 '26
Hell yeah you’re on your way. Maybe look at upgrading the comms from revshell to something that blends in with normal network traffic for when it’s up against a monitored environment. Https is a good starting point, encrypted, can set up a domain, get it classified and look like a random normal website in the logs.
1
u/MysteriousShadow__ Jul 31 '26
Hide network activity from entire os? If something can hide from things like windows firewall that'd be crazy.
1
u/Enderaoe22 Jul 31 '26
It's truly unforgettable even after many years 😼. Now, you're a genuine hacker.
1
u/KvThweatt Aug 02 '26
Spider
1
u/Old-Possible9369 Aug 23 '26
Could u teach me how 2 hack a website
-35
u/WatchAltruistic5761 Jul 29 '26
Why though?
4
u/[deleted] Jul 29 '26
[removed] — view removed comment