WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) 1 [2]   ( Go to first unread post )

Packet Sniffing, Using a good packet sniffer to capture network port data

SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


Hi Xes.

Thanks again for your help and insights.

Likewise... I am sure some other coders new to Internet development will be greatful for the example of SendHTTPRequest.


Attached below is an image of where the dialog stands as I finish the code for using data received from the router when making queries for status or sending control commands.

The edit controls on the left side are for outgoing http headers & content, while the right is for incoming hhtp headers & content.

Using this scheme was very helpful in communicating with the router, decoding the data, and displaying it. Even better is the fact I can copy and paste string data into the project with a lot less typing.

Once I get the rest of the data into this project, I'll add the labels and additional dialogs for a finished project and a much better screenshot!

I'm a bit crunched for time... so...

After this post I will spend some time later tonight to gather up more to share. ( my desktop is a mess laugh.gif )

@EDIT

Although HTTP 1.1 is implemented on the PC side, the router www.engine only implements HTTP 1.0 & CGI

This particular image illustrates the results of making a request for Router Statistics...

Attached Image
Attached Image
PM
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


QUOTE (XeS @ Dec 27 2009, 02:22 PM)
...If you need more information you should try to get ethereal running. It's really great in comparism with smartsniff.

Hi.

Just some followup. Here's a quote from a security related article I read two nights ago...

QUOTE
Ethereal has suffered from dozens of remotely exploitable security holes, so stay up-to-date and be wary of running it on untrusted or hostile networks (such as security conferences).


Similiar information indicated WireShark is boss in this category. thumbs_up.gif
PM
Top
XeS
Quote Post


Extremely Active Member
******

Group: Members
Posts: 253
Member No.: 15879
Joined: 3-December 08


QUOTE (SeaFarer @ Jan 9 2010, 02:24 PM)
QUOTE (XeS @ Dec 27 2009, 02:22 PM)
...If you need more information you should try to get ethereal running. It's really great in comparism with smartsniff.

Hi.

Just some followup. Here's a quote from a security related article I read two nights ago...

QUOTE
Ethereal has suffered from dozens of remotely exploitable security holes, so stay up-to-date and be wary of running it on untrusted or hostile networks (such as security conferences).


Similiar information indicated WireShark is boss in this category. thumbs_up.gif

That's right, ethereal suffer from security vulnerability. But it's indeed the last version of wireshark which is known to run with win9x systems. And that was the reason why i recommended it to you. For all the other mates out there i've postet the wireshark links. For network analys i really recommend everyone to use wireshark. If you only want to get a quick view of a tcp connection and its contents you can use any other software too. The ethereal security vulnerability isn't really a problem for you. Because I don't think you're going to analyse a website which offers security related proof of concepts or something similar. And your own network should be a trusted network. I only want to followup that it doesn't need to be a problem in all kind of situations.

On the whole you're right. It's better to let everyone know that this tool is out of date and suffers from security vulnerabilies. My apologies is that i simply forgot to mention that. Thanks for your addition SeaFarer!
cheers.gif

Best regards,

XeS
PMEmail PosterUsers WebsiteICQ
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


No problem Xes.

Not like I will use 9x forever. Its just what I have for now.

Plus despite being mocked at times for using it... I guarantee there are A LOT of people still using 9x/NT systems.

For my detractors... when I win the lottery or "FINALLY GET A REAL OPPORTUNITY" then you can bet I will be updated as best as can be for that time.

Matter of fact...

One woman I know in my neighborhood was still using windows 95 OSRB2 until last spring when she asked for help updating to windows 98 since she had heard I was still using it. In the process I convinced her to just take a better PC with Win98.

In the end she went from a really old 200mhz pentium (no mmx) to a 466mhz PIImmx or maybe it was PIII? It was a much better PC, and it cost her nothing since the computer was from another neighbor who was throwing it out on garbage day. biggrin.gif

As always XeS your advice and expertise are appreciated. wink.gif
PM
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


Hi fellas! Here's some more follow-up.

For the last few days...

I was really stumped on this project trying to figure out a better, smoother, more fluid alternative to not having any error checking thus far and avoiding the use of a timing cycle between the sending of commands to the router. ( Commands being HTTP/GET for status requests, or HTTP/POST for router control data )


Well... while doing further research with Google, I could not find the information I was looking for concerning the use of the Winsock API with UDP port 514. ( Syslog-RFC3164 )

Which left me having to wing things again. ( man I hate it when that happens rolleyes.gif )

After spending the whole evening last night tinkering around... I was finally able to reliably receive sysLog datagrams from the router on local port 514 in addition to TCP/IP datagrams on local port 80.

The end result now is having a solid and reliable mechinism for logging and evaluating router status in real-time, without the need for using a fixed timing cycle or evaluting the content returned from the router on port 80 using HTTP requests, while gaining additional control of the router's connection state & ports through automation. ( Naturally HTTP is only being used to gather status information for display purposes for those items that are not monitored in the router's built-in sysloger )

Lets put it this way, it opens up a whole new ball game and more potential for this type of project!

Most notably in getting real-time status information on the LCP or PAP for ADSL or Fiber Optic connections, and again without sending HTTP requests with the GET method to analyze the status pages built into the router www engine.


Here, let me explain...

When the router is configured to send syslog messages to a specific address, or broadcasts, them over the LAN, the control can now intercept these messages in real-time, and behave accordingly in ways that were not possible with a fixed timing cycle and analyzing the internal log inside the router, or any of the status pages alone.


The bennefits...

One added bennefit is real-time logging of "all" router activity on the PC the control is running on, thus bypassing the 22KB log size limit inside the particular router being used for development. Which by the way pans old data out in place of new once the log is full.

In layman's terms, we can have a local log that is only limited by free disk space or aggregated directly into other network traffic logs and saved or relayed to other SysLog servers/clients.

It's also very convienent to not have to deal with the router's internal log if so desired. Maybe even elegant and real smooth man. biggrin.gif


Best of all though...

The administrating/server PC can now detect, in real-time, any monkey business going on with respect to outside traffic comming into the LAN.

Maybe a denial of service attack is launched at the LAN, www server(s), or perhaps a port scan? Besides local logging, we can actually make the control do something about what is taking place, based on the event, simply by analyzing the syslog message. How cool is that?


For example...

Let's say you were asked to visit a URL with your browser that redirected you through a proxy in order obtain your Internet Gateway IP address with the sole purpose of scanning your Router/LAN/servers for open ports, whilst giving the party scanning for those ports some identity evasion & data collection forwarding abilty while doing the dastardly deed.

Oh s%*@! ohmy.gif Was someone being naughty? tongue.gif laugh.gif

Or maybe the proxy wants to obatin this information whilst making it appear the individual who gave you the link is being naughty, thus trying to start a net war? unsure.gif

No matter, except that perhaps it was just a single port scan which might otherwise go un-noticed, like your VNC/Upnp ports?

Well... this control can now act accordingly and do something about it, without human interaction! Now that's cool! cool.gif


But how does it respond?

Maybe the control just renews the Gateway IP address, then lets the DynDNS client do the rest? If you use DynDNS.

Maybe it just evaluates the port scan further, to determine if its a legitimate request to activate that port on the router for incoming traffic?

You know... based on authentification and additional criteria from the party doing the scan?

Think of it kind of like a way to turn on remote management/remote access, from remote, when remote management is off, or that particlar port is off due to a firewall exclusion.

Maybe we don't say what exactly it does and be more creative. Perhaps employ tarpits or honeypots to analyze what the intruder is up too for developement purposes?

Or maybe it just takes the LCP down and disconnects the LAN from the WAN to avoid further attack, scans, or all WAN activity LAN wide, forcing some sort of human administration?

Sounds intriguing huh... Pretty darn clever and cool don't ya' think? cool.gif


Conclusion...

As you can see we have lot's of potential now with the engine I've been crafting for a control of this type.

Verizon, Netgear, Linksys, et al., are you paying attention? Dr. Sea at your service! For a fee of course. wink.gif


Now... back to crafting some more pa'zaz and Bruce Lee into this sucker. thumbs_up.gif


Have a great day guys! blink.gif


@Ragdog

What say you Zen Master Ragdog? Is Sea ready to advance from purple belt & receive black belt now? laugh.gif

Greet'z & Happy new year! wink.gif


@Shoorick

There we were talking about schooling... laugh.gif

Cheers my friend! cheers.gif


@XeS

You lil' devil! laugh.gif

Thanks for helping me debug this bad boy and updating my help system bro, you are the man! Plus its good to see someone like you around!


@JimG

Ahem... where are you Jim? unsure.gif Is a certain game still calling you? laugh.gif


@VulPeCula

How you doing man? XeS didn't blow your brain up did he? No offense XeS. Just keeping things boyant and playful. tongue.gif


@Everyone

You can read more about RFC3164 here...

http://www.ietf.org/rfc/rfc3164.txt


If you want a really nice freeware SysLog daemon for debugging your own projects, or just watching your network devices, 3Com/USrobotics has one here...

http://support.3com.com/software/utilities_for_windows_32_bit.htm

There are some other utilities that may be of interest too. cheers.gif
PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) 1 [2]  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google