Skip to content

Does the port need to be open? #4

Description

@Whip

Hi. I'm trying this out on my own CentOS server. I used nmap to scan for open ports, I got this result:

Discovered open port 21/tcp on xxx.xx.xx.xxx
Discovered open port 143/tcp on xxx.xx.xx.xxx
Discovered open port 993/tcp on xxx.xx.xx.xxx
Discovered open port 110/tcp on xxx.xx.xx.xxx
Discovered open port 587/tcp on xxx.xx.xx.xxx
Discovered open port 995/tcp on xxx.xx.xx.xxx
Discovered open port 3306/tcp on xxx.xx.xx.xxx
Discovered open port 443/tcp on xxx.xx.xx.xxx
Discovered open port 25/tcp on xxx.xx.xx.xxx
Discovered open port 80/tcp on xxx.xx.xx.xxx
Discovered open port 465/tcp on xxx.xx.xx.xxx

Then I used netcat to listen to a port and modifed php file to communicate on that port and visited the url. Here's what I get for ports like 1234, 4444, etc.

WARNING: Failed to daemonise. This is quite common and not fatal.
Warning: fsockopen(): unable to connect to 198.46.87.211:4444 (Connection refused) in /home/xxxxxx/public_html/php-reverse-shell.php on line 100
Connection refused (111) 

And when I try an open port like 3306, I get this:

WARNING: Failed to daemonise. This is quite common and not fatal. Successfully opened reverse shell to 198.46.87.211:3306 ERROR: Shell connection terminated

But I'm not getting anything on netcat in either case. What am I doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions