First of all can it be done? I've looked everywhere for some VB demos on this but can't find anything. Anyone have any info/directions to get me on the right track?
Thanks in advance :thumb:
Printable View
First of all can it be done? I've looked everywhere for some VB demos on this but can't find anything. Anyone have any info/directions to get me on the right track?
Thanks in advance :thumb:
I'm sorry but what is it you want to know about it... Port scanning is usually done by SpyWare apps. You're not building one are you?
I'm trying to test my firewall. It's definently not for any type of malware :eek:
just got to a bunch of porn and freebie sites. plenty of stuff there that your firewall would be tested on.
Actually, this sounds like something I'm interested in also, and NOT to code up spyware.
AFter I finish my mess with the .gif/.jpg files, I wanted to investigate the possibility of writing a small routine to sit on my desktop in a resizable window, that would monitor my ports. Even though I have several things running in the system, plus ZoneAlarm, I wanted to have the experience of monitoring my machine (because I guess I don't trust someone else's software LOL) to see what is open, having the option to close it, and see who or what is sniffing around my machine.
Perhaps that's what the question was about ... not sure but that's my "hunch."
Quote:
Originally Posted by Joacim Andersson
No...lol :). I basically want to see how/if my firewall will react to a half-open port scan. This method is more 'discreet' then a normal scan so i wanna see what happens, and im not keen on downloading 'port scanners' from the net.
That would be cool, there are a few things i have actually wanted software like that for.Quote:
I wanted to have the experience of monitoring my machine (because I guess I don't trust someone else's software LOL) to see what is open, having the option to close it, and see who or what is sniffing around my machine.
it would be cool if you could have a list of all ports that have done something in the last 10 min since opening the program, then display in various ways the information going out, like showing the unicode, ascii, ansi, integer, mabe even colour equivalents of a certain number of the most recently sent and recieved bytes
this would also be able to test your firewaal because you can see in actual applications where your computer is being hacked what your firewall is letting through, instead of just one specific test.
unfortunatley this does not seem at all like something easy or even something i could do, but there are some smart people with a lot of free time(judging by their post counts) lol
First thing would be to get a port sniffer, like ethereal. That will show you what is coming thru. Then you have to determine if and how it should be blocked.
Since I run several websites I study hacking so I know how to defend myself, so this is one of the few times I would be able to help someone with VB, I use stuff like php more.
I have made a port scanner in VB and this is the tutorial that I went by:
A port scanner in VB
--------------------
you need:
2 textboxes
1 listbox
3 commandbuttons
1 timer
1 winsock control
--------------------
code:
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Text2.Text = "0"
End Sub
Private Sub Command3_Click()
List1.Clear
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Winsock1.Close
Text2.Text = Int(Text2.Text) + 1
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = Text2.Text
Winsock1.Connect
End Sub
Private Sub Winsock1_Connect()
List1.AddItem Winsock1.RemotePort & " is
open!" End Sub
--------------------
explanation:
text1 = IP to scan
text2 = starting port
list1 = list where all open ports are shown
command1 = start
command2 = stop and reset
command3 = clear port list
timer1 = will make the winsock control to try ports
But Winsock1.Connect makes a full connection... Making a port scanner is simple simon, but a half open one would not be, if not impossible. I think Winsock in VB restricts things like this :(