Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Backdoor


ghost's Avatar
0 0

Hey everyone. I've been messing around with sockets in php and I coded a little backdoor (way easier than I thought it would be BTW). Anyways, when I try to connect to it via netcat (nc -l -v -p 123), I get a timeout error and that it was unable to connect to me. The host that I enter into fsocketopen() in the backdoor is just my IP from whatismyip.com

I have a feeling I'm just forgetting something stupid, but do you guys have any ideas of what I could be doing wrong? I looked online and most people said that it was their firewall blocking the connection, but I'm running bt4 so I don't know what it could be.


stealth-'s Avatar
Ninja Extreme
0 0

You need to configure port forwarding on your router. Your router is getting those packets, going "what the hell am I supposed to do with these?", and then discarding them. You have to set up your router so it forwards packets on port 123 to your computer inside the LAN.

There might be an easier solution, though. Is the computer running the PHP script on the same machine as the one you are running netcat from? In that case, just use this ip: 127.0.0.1

Even if it's not on the same machine, if it's on the same LAN then just use the local IP of the netcat machine rather than bothering through port forwarding.

Hope that helps :)


cyber-guard's Avatar
Not Just a member
0 0

By default most of the routers won't forward any ports in order to protect by default the user a bit. You will have to log in to your router, forward the port you want to use for the reverse connection

Edit: Damn stealth beat me to it


ghost's Avatar
0 0

Alright, thanks guys!


stealth-'s Avatar
Ninja Extreme
0 0

No problem, Good luck Xof. @Cyber-Guard: Just good timing ;)


ghost's Avatar
0 0

It also won't hurt you to use a function that php will actually recognise.


ghost's Avatar
0 0

fsockopen() Typo