chux0r / netbang

Scrappy scanner written in Go. Exploring the relevance of "scanning" in the new realm, what redteams need, and what methods can get us what we need quickly and, if at all possible, silently.
https://github.com/chux0r/netbang
GNU General Public License v2.0
2 stars 1 forks source link

in version 0.24 alpha --ports spec flag still scans a named list (win_test list) when single port specified #11

Closed chux0r closed 1 year ago

chux0r commented 1 year ago

Dev artifact made it to prod?

PS > .\netscanx.exe --ports 3389 127.0.0.1
ParsePortsCDL input string:  3389

Item: 3389

Num character is 9 times 1 (x10^0), totaling 9
Num character is 8 times 10 (x10^1), totaling 89
Num character is 3 times 100 (x10^2), totaling 389
Num character is 3 times 1000 (x10^3), totaling 3389Strings slice:  []
uint16 slice: [3389]Ports specified:  [3389] List specified:  []
tcpScan [127.0.0.1:137] :: Error: [tcpScan [127.0.0.1:623] :: Success!
tcpScan [127.0.0.1:445] :: Success!
tcpScan [127.0.0.1:5040] :: Success!
tcpScan [127.0.0.1:3389] :: Success!
tcpScan [127.0.0.1:5985] :: Success!
tcpScan [127.0.0.1:135] :: Success!
dial tcp 127.0.0.1:137: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.]
tcpScan [127.0.0.1:139] :: Error: [tcpScan [127.0.0.1:8000] :: Error: [dial tcp 127.0.0.1:139: connectex: No connection could be made because the target machine actively refused it.]
dial tcp 127.0.0.1:8000: connectex: No connection could be made because the target machine actively refused it.]tcpScan [127.0.0.1:9999] :: Error: [dial tcp 127.0.0.1:9999: connectex: No connection could be made because the 
target machine actively refused it.]
chux0r commented 1 year ago

this line in main():

thisScan.NetDeets.PortList = buildPortsList("tcp_test_win") // TEST LINE - TODO: remove after putting in constructor()
chux0r commented 1 year ago

finished plumbing up --ports :: created a port list builder to bring all named and port-number-specification together, including a default set if none picked.