malwaredllc / byob

An open-source post-exploitation framework for students, researchers and developers.
https://byob.dev
GNU General Public License v3.0
8.93k stars 2.11k forks source link

connection not answered (but not refused) #495

Closed arch-user-france1 closed 2 years ago

arch-user-france1 commented 3 years ago

Please use the Discord Support Server if you need help and reserve creating issues for bug reports.

Describe the bug Just don't show and aren't connected: urllib.error.URLError: <urlopen error [Errno 110] Connection timed out> server does not answer but firewall opened && portforwarding with 1337-1339 both

To Reproduce Steps to reproduce the behavior: Just try it out and fail

Expected behavior

Screenshots

Desktop (please complete the following information):

Additional context Port 5000 not forwarded; Ports on both systems forwarded (iptables:) sudo iptables -A INPUT -p tcp --dport 1337 -j ACCEPT sudo iptables -A OUTPUT -p tcp --dport 1337 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 1338 -j ACCEPT sudo iptables -A OUTPUT -p tcp --dport 1338 -j ACCEPT sudo iptables -A OUTPUT -p tcp --dport 1339 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 1339 -j ACCEPT (they weren't blocked so...)

It also didn't work past 1 year were I tried to change the ports in the payloads (I just could have change them in the run.py script. Also There the not-web-gui version worked so I assume it is a problem in the code)

arch-user-france1 commented 3 years ago

france1@ubuntu-desktop:~/Downloads$ sudo nmap 192.168.0.10 Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-21 13:29 CEST Nmap scan report for 192.168.0.10 Host is up (0.0033s latency). Not shown: 994 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 2222/tcp open EtherNetIP-1 5000/tcp open upnp 8088/tcp open radan-http MAC Address: 00:11:6B:68:08:95 (Digital Data Communications Asia)

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds france1@ubuntu-desktop:~/Downloads$

special...

arch-user-france1 commented 3 years ago

france1@ubuntu-desktop:~/Downloads$ cloudssh Welcome to Ubuntu 21.04 (GNU/Linux 5.11.0-31-generic x86_64)

1 update can be applied immediately. Um zu sehen, wie diese zusätzlichen Updates ausgeführt werden: apt list --upgradable

System restart required Last login: Sat Aug 21 13:02:42 2021 from 192.168.0.1 france1@macubuntu:~$ nmap -p 1337-1339 localhost Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-21 13:34 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.00020s latency).

PORT STATE SERVICE 1337/tcp open waste 1338/tcp open wmc-log-svc 1339/tcp open kjtsiteserver

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds france1@macubuntu:~$

the ports don't go out to LAN How can I fix that

fireFerry commented 3 years ago

Did you port forward on your router?

arch-user-france1 commented 3 years ago
  1. This is completely unnessecary because Ubuntu somehow blocks the ports 1337-1339. Localhost shows me that the ports are open but when I try to scan with eg. 192.168.161.284 the ports aren't open (detected by nmap)

  2. Yes I have it

  3. How can I prevent this issue

arch-user-france1 commented 3 years ago

Did you port forward on your router?

Please read all messages

fireFerry commented 3 years ago

The payloads use your public ip, so port forwarding is necessary. Make sure to have the Ubuntu firewall disabled with sudo ufw disable.

arch-user-france1 commented 3 years ago

That didn't do any effect The problem is that 1. the port isn't blocked (refused) and 2. isn't reachable on the ip for my LAN (182.168.0.10)

I stopped ufw and that didn't help (and I think if ufw is on and blocks the port then it comes port refused instead of connection timed out)

arch-user-france1 commented 3 years ago

france1@ubuntu-desktop:~/Downloads$ sudo nmap 192.168.0.10 Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-21 13:29 CEST Nmap scan report for 192.168.0.10 Host is up (0.0033s latency). Not shown: 994 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 2222/tcp open EtherNetIP-1 5000/tcp open upnp 8088/tcp open radan-http MAC Address: 00:11:6B:68:08:95 (Digital Data Communications Asia)

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds france1@ubuntu-desktop:~/Downloads$

special...

See this? On localhost is says the ports are open but at 192.168.0.10 not - no reason to port forward now because the ports aren't open

Also the port 4444 (tested with ncat) is not usable. Just like around Minecraft Port, 80,443, 22, 2222 work

fireFerry commented 3 years ago

We cannot help you anymore with networking issues, you just need to make sure to:

arch-user-france1 commented 3 years ago

I don't have a vm The ports aren't opened at my LAN ip but they're open at localhost. Is this a firewall issue? I tried to accept all ports 1337-1339 as you can see above and UT didn't help What's the issue?

fireFerry commented 3 years ago

The issue is about port forwarding. To use the payloads from the web-gui, you need to port forward on your router for the payloads to work.

arch-user-france1 commented 3 years ago
  1. Ports are forwarded
  2. IT ISN'T THE PROBLEM :
  3. it looks like you don't have any knowledge with IP adresses, 192.168.xxx.xxx is a LAN network IP - the ports aren't visible from another computer, just on localhost (nmap localhost)
  4. How can I get my computer or idk router to forward those ports to 192.168.0.10 wich is the IP of Server (they are visible on localhost but not the IP)
fireFerry commented 3 years ago

You're explaining it quite vaguely and I'm just trying to help here, but it seems like the help is unwanted. We cannot help you further with these networking issues, you'll have to figure this out yourself. Have a nice rest of your day

Sincerely, fireFerry

arch-user-france1 commented 3 years ago

Well my day wasn't nice But I try to explain everything here

Ports are forwarded The Payload shows a timeout not a connection refused A nmap scan of localhost shows the ports (1337-1339) but a scan of 192.168.0.10 (ip of server where the port 5000 for web GUI works) doesn't show the ports 1337-1337. Also the port 4444 doesn't appear but the ports 255** work, 80,443 work and some more

I am using Ubuntu Once I tried with disabled firewall (sudo service ufw stop)

Uhm yeah I try to research by my own too but it mainly's annoying Maybe I Should check it with wireshark etc. I don't have any idea how I can fix it

fireFerry commented 3 years ago

As I said,

We cannot help you further with these networking issues, you'll have to figure this out yourself.

"Connection timed out" is a networking error and not an error/bug with byob itself. That's the reason why we cannot help you further.

github-actions[bot] commented 2 years ago

Stale issue message