TCP port scanner

Community Forums/Showcase/TCP port scanner

Andres(Posted 2007) [#1]
Wrote a little TCP port scanner in BlitzPlus. Finds most of the common servers (FTP, HTTP, POP3, IMAP, MySQL etc) within 30 seconds.

Screenshot:


Compile this code to "port.exe" and run it, othwerwise it won't work:

You need to compile it because it uses one "port.exe" for each port. One exe would take too long :)

Results for blitzbasic.com:
www.blitzbasic.com:21 (FTP) Successfull!
www.blitzbasic.com:80 (HTTP) Successfull!
www.blitzbasic.com:3306 (MySQL) Successfull!
www.blitzbasic.com:995 (SPOP) Successfull!
www.blitzbasic.com:53 (DNS) Successfull!
www.blitzbasic.com:143 (IMAP) Successfull!
www.blitzbasic.com:993 (SIMAP) Successfull!
www.blitzbasic.com:443 (SSL) Successfull!
www.blitzbasic.com:22 (SSH) Successfull!
www.blitzbasic.com:110 (POP3) Successfull!



jfk EO-11110(Posted 2007) [#2]
Hey that's clever! Although BLitz can't do multithreading, you still did it using multiprocessing - or something. Nice one.


puki(Posted 2007) [#3]
This seems exciting.


Andres(Posted 2007) [#4]
I've created also an FTP password "recovery" tool, where a file has most commonly used passwords in it:


Currently I'm workin' on a proxy TCP stream functions.


jfk EO-11110(Posted 2007) [#5]
Funny, just don't try this on my server, unless you want to get in touch with a 124 grain fullmetal jacket poop thingie :P

Seriously, a more eduction-stuff sounding name would be a good idea IMHO. "Password Security Analysis" or somethin.

I'd also like to note: trying several passwords on a FTP server that you are not the owner of may be illegal in several countries, and today it's pretty easy to track a hacker down when it's a simple and direct brute force attack like this.


Andres(Posted 2007) [#6]
It's not brute-force. passwords.txt contains most commonly used passwords. Brute-force tries absolutely every possible cobination.
I know it's illegal that's why I don't share it.
About the tracking ss I said, i'm workin on multi-proxy connections :P


Paul "Taiphoz"(Posted 2007) [#7]
Its not illegal to code or use, Its only illegal when you use it on a server or service that you do not have permission for.

I think you should release the source its not like what you have is any greate secret, a quick google will produce software thats free than can do the job 100 times better.

All your doing is holding onto some code that could actually help some one in the community learn something, and that cant really ever be bad.

Just my opinion.. nice work.


Andres(Posted 2007) [#8]
Password file has all passwords in first line of the file which are separated with spaces (" ").
Connections: Each connection tries different passwors (for faster tries/s).

B+ code of FTP password recovery:

Example of passwords file:



jfk EO-11110(Posted 2007) [#9]
Yavin - I didn't mean this is evil software or something. Thought someone has to mention, that if somebody is trying this on a server (where he has no permission) without to think much about it, this could surprisingly result in a legal case and cost a couple of thousand $.


Paul "Taiphoz"(Posted 2007) [#10]
@Jfk, yeah. I understand, just felt that he should release the source cos I got the impression he felt the source was bad, source does not hurt servers, people hurt servers...

Not sure if that analogy works but you get the idea.

Anyway I tested this out on a few friendly servers, two of which we well configured and the door was closed on my IP after only the 3rd failed attempt, the third was deliberately miss configured, and the app gained access after only 25 minutes.

We also noticed that with a slower attack rate, the app causes less of a digital finger print which in a lot of cases is actually a good thing, slower is better when you don't want to be noticed.

This is a lot like My Stumbler, you can try the same thing you have a good handle on the code in Max, what I did was setup an edit box to hold, names, one for passwords, and I then setup a 3rd for Proxy IP's socks 4 and 5.

My app then tried 2 passwords and then randomly grabbed a new proxy IP and tried another 2, this is normally enough to freak out the server and you should get banned, it needs to be done slow tho so the cracking time goes down, and you do create a much bigger footprint due to lots and lots of connections from multipull IP's however, if your writing this to test your own FTP server which I am assuming you are ;) - then you should give it a try.