## STPortScanner
GITHUB: [https://github.com/DebugST/STPortScanner](https://github.com/DebugST/STPortScanner)
![STPortScanner](https://github.com/DebugST/STPortScanner/blob/main/Images/Screen%20Shot%202021-03-18%20at%2016.27.01.png)
![STPortScanner](https://github.com/DebugST/STPortScanner/blob/main/Images/Screen%20Shot%202021-03-18%20at%2017.30.50.png)
## å
³äºä½è
* Blog: [Crystal_lz](http://st233.com)
* Mail: ([email protected])
## å¯æ§è¡ç¨åºåæ°
```cs
--------------------------------[STPScan 4.0]--------------------------------
-h Host ......................................... [é»è®¤:æªæå®]
-h target.com,192.168.0.1,192.168.0.2-192.168.1.254,192.168.0.0/24
-hf Host from file ä»æ件å è½½'\n'åå² ............ [é»è®¤:æªæå®]
-hf ./iplist.txt
-p Port ......................................... [é»è®¤:Top 300]
-p 21,22,80,443,8000-8080
-pf Port from file ä»æ件å è½½'\n'åå² ............ [é»è®¤:æªæå®]
-pf ./portlist.txt
-np Null Probe 空æ¢æµå
.......................... [é»è®¤:æªæå®]
-pr The count of probes è¿è¡å¤å°æ¬¡åè®®æ¢æµ........ [é»è®¤:2]
-pr 3
-i ICMP only ä»
æ«æåæ´»ä¸»æº ..................... [é»è®¤:æªæå®]
该æä½éè¦ç®¡çåæéåserverç³»ç»
-is ICMP + Scan å
æ«æå活主æºåæ«æ ............. [é»è®¤:æªæå®]
-t Timeout è¶
æ¶æ¶é´ ............................. [é»è®¤:5]
-t 3
-tt TotalTimeout ä¸ä¸ªä»»å¡æ»è¶
æ¶æ¶é´ .............. [é»è®¤:60]
-tt 50
-r Retry éè¯æ¬¡æ° ............................... [é»è®¤:2]
-r 5
-st Tcp Scan 使ç¨TCPæ¹å¼æ«æ ..................... [é»è®¤:å·²æå®]
-su Udp Scan 使ç¨UDPæ¹å¼æ«æ ..................... [é»è®¤:æªæå®]
-ss Syn Scan 使ç¨SYNæ¹å¼æ«æ ..................... [é»è®¤:æªæå®]
该æä½éè¦ç®¡çåæéåserverç³»ç»
-smb Only scan 445 éè¿smbæ¢æµç³»ç»çæ¬(ä»
æ«æ445) . [é»è®¤:æªæå®]
-con Concurrent of Scanner 并åæ° ................. [é»è®¤:6000]
-con 20000
-stop Stop å½æ«æå°æå®åè®®æ¶ åæ¢è¯¥ä¸»æºæ«æ ....... [é»è®¤:æªæå®]
-stop http,https
-order The priority of scanning ä¼å
æ«æé¡ºåº ........ [é»è®¤:rnd]
-order (host or port or rnd)
-delay The delay æ§å¶å°è¿åº¦å·æ°æ¶é´ ................. [é»è®¤:2]
-delay 5
-cd Console Display æ§å¶å°æ¾ç¤ºæ¹å¼ ............... [é»è®¤:2]
-cd (0 or 1 or 2)
0 Not display
1 xxx.xxx.xxx.xxx:xxx [Protocol]
2 xxx.xxx.xxx.xxx:xxx [Protocol][RegexLine][Banner]
-o Out to file è¾åºç»æå°æ件 ................... [é»è®¤:æªæå®]
-o ./result.txt
-f Format for output è¾åºæä»¶æ ¼å¼................ [é»è®¤:json:h,pr,b]
-f (json or csv):(fields)
h Host [127.0.0.1:8080]
a Address [127.0.0.1]
p Port [8080]
pt Protocol Type [TCP]
pf Protocol Flag [http]
pr Protocol [(TCP)http]
l Line for regexpression [123]
b Banner [SSH-2.0-Ubuntu-Server]
d Hex data for recv [485454502F312E312032...]
-cn Convert Nmap config file 转æ¢nmapé
ç½®æ件为å½åæ«æå¨éé
æ件
parameters [Nmap config file] [Save file for STPscan]
-cn [./nmap-service-probes] [./config_nmap.st]
-2021-03-19----------------Powered by -> Crystal_lz-----------------ST233.COM-
注:
icmp ä¸ syn ä¸è½åæ¶ä½¿ç¨ 并ä¸æ¨è使ç¨è¿ä¸¤ä¸ªé项 æµè¯é¶æ®µ
Null Probe -> æ¯å¦ä½¿ç¨ç©ºæ¢æµå
è¥ä½¿ç¨
è¿éåå
çå¾
对æ¹è¿åbanner(å¦:mysql,ftp主å¨è¿åbanneråè®®ç) ç´å°è¶
æ¶æè¿è¡ä¸ä¸æ¬¡æ¢æµ
å¦å
è¿éåç«å³åéæ¢æµå
åºå«
ä¸ä½¿ç¨ å°å½±åæ¶å°banneræ¯è¿è¡è§å¶å¹é
çé¡ºåº å°ä¼å
使ç¨åéçæ¢æµå
çè§åå¹é
åè¿è¡ç©ºæ¢æµå
çè§åè¿è¡å¹é
(mysql,ftpçåè®®æ éæ¢æµå
çè§å)
ä¸ä½¿ç¨éåº¦å¿«ç²¾åº¦ä½ ä½¿ç¨é度æ
¢è¿åº¦é«
eg:
STPScan -h 192.168.1.1/24
STPScan -h 192.168.1.1/24 -pr 3
STPScan -h 192.168.1.1/24 -smb
STPScan -h 192.168.1.1/24 -p 80,443,8000-8080 -pr 3
STPScan -h 192.168.1.1/24 -o result.json
STPScan -h 192.168.1.1/24 -o result.csv -f csv:h,pr,d
```
## è°ç¨åºæ¥å£
```cs
[Interface]
IPortScanner : IDispose
[Configer Class]
ProbeConfiger
[Scanner Class]
PortScanner : IPortScanner
TCPScanner : PortScanner
UDPScanner : PortScanner
SYNScanner : PortScanner
SmbScanner : PortScanner
IcmpScanner : IDispose
[Other Class]
IcmpEventArgs : EventArgs
ScanEventArgs : EventArgs
RawSocket
[RawSocket]
static RawSocket.Dispose();
static RawSocket.InitRawSocket(EndPoint bindEndPoint);
static RawSocket.SendData(byte[] byBuffer);
static RawSocket.RecvCompleted -> EventHandler