harryvella09 / PortScanner

PortScanner Tool enables a Network Administrator to find the open port on a remote server. This project is developed in C language and makes use of raw-socket programming. This tool supports IPv4 and can perform six types of scans namely TCP SYN, NULL, FIN, Xmas, ACK scans and UDP scan. This basic tool stores the results of each scan and makes a conclusion on whether a port is open, closed, filtered, unfiltered or open-filtered. Along with these scans it also finds the version of service running on few pre-defined standard ports like SSH, Whois, HTTP etc.,
Other
16 stars 4 forks source link

hello #1

Open MRchen532 opened 6 years ago

MRchen532 commented 6 years ago

Cannot implement probe after generating executable file, why

harryvella09 commented 6 years ago

Can you please elaborate on what you are trying to achieve?

MRchen532 commented 6 years ago

Your software's implementation function is port scanning, but it can not be achieved, would like to ask the input command is ./portScanner --ports 1-80 --ip 10.211.55.3 --scan SYN?

MRchen532 commented 6 years ago

And what system environment did you develop?

harryvella09 commented 6 years ago

This code uses raw sockets, which requires you to run the tool with root privileges. Run the executable with sudo prepended to your command.

MRchen532 commented 6 years ago

thanks,there is also a problem that can detect the service condition but does not show the port live state,why?

MRchen532 commented 6 years ago

[root@CentOS7 PortScanner-master]# ./portScanner --ports 1-85 --ip 192.168.122.1 Scan Configurations Target Ip-Address : 192.168.122.1 No of Ports to scan : 85 Scans to be performed : SYN NULL FIN XMAS ACK UDP Scanning.. Service Detection for port 24 failed due to connect error Service Detection for port 43 failed due to connect error Scan took 0.900710 secs IP address: 192.168.122.1

SERVICE VERSION DETECTION RESULTS

IP ADDRESS : 192.168.122.1

Port Service Version

22 SSH-2.0-OpenSSH_7.4 24 UNKNOWN 43 UNKNOWN 80 Apache/2.4.6 (CentOS) PHP/5.4.16

MRchen532 commented 6 years ago

Scan results like this

MRchen532 commented 6 years ago

Under what circumstances did you develop?Very strange

harryvella09 commented 6 years ago

The service detection is implemented only for few ports, see ps_version.c for it's implementation logic. Also, please read the Readme.pdf file to understand the functionality implemented.

"This tool supports IPv4 and can perform six types of scans namely TCP SYN, NULL, FIN, Xmas, ACK scans and UDP scan. This basic tool stores the results of each scan and makes a conclusion on whether a port is open, closed, filtered, unfiltered or open-filtered. Along with these scans it also finds the version of service running on few pre-defined standard ports like SSH, Whois, HTTP etc.,"

MRchen532 commented 6 years ago

I have already checked it carefully, but it does not show the port status, only the service probe information.

MRchen532 commented 6 years ago

[root@CentOS7 PortScanner-master 8]# ./portScanner --ports 1-85 --ip 192.168.122.1 --scan SYN Scan Configurations Target Ip-Address : 192.168.122.1 No of Ports to scan : 85 Scans to be performed : SYN Scanning.. Service Detection for port 24 failed due to connect error Service Detection for port 43 failed due to connect error Scan took 0.329824 secs IP address: 192.168.122.1

SERVICE VERSION DETECTION RESULTS


IP ADDRESS : 192.168.122.1

Port Service Version

22 SSH-2.0-OpenSSH_7.4 24 UNKNOWN 43 UNKNOWN 80 Apache/2.4.6 (CentOS) PHP/5.4.16

MRchen532 commented 6 years ago

You see, there is no port open or other status