http://www.vrlsec.com



hackinthebox
 ::  hitb portal  ::  hitb portal (SSL)  ::  hitb forum (SSL)  ::  hitb security conference  ::  hitb training ::  hitb irc  ::  hitb photos  ::  hitb videos :: 
Who's Online
There are 202 unregistered users and 0 registered users on-line.

You can log-in or register for a user account here.



Main Menu

Top Stories for Today
[419] How to Design a Secure DMZ
[401] German ID cards hacked by the CCC
[356] Malware hosted on Google Code project site
[256] Apple's elephant in the cloud
[228] Russian cops cuff 10 ransomware Trojan suspects
[228] Algerian Hackers Attack Wrong Website
[217] How Google attacks changed the security game
[201] Feds crack phone clone scam that cost Sprint $15m
[197] PSJailbreak code leaked online
[193] US undergrads crash NASA satellite into Arctic
[192] Heartland to pay Discover $5M for 2008 data breach
[191] How Your Cloud Dream Is Becoming a Security Nightmare
[190] Apple's iOS 4.1 ships Sept. 8
[184] Malaysian National Institute of Public Administration suffers cyber attack
[162] DARPA launches insider threat detection effort for military
[144] China demands real names from mobile phone users
[138] VMWare Sees Big Business In Becoming The Internet Operating System
[128] Windows Phone 7: Done

View the Top 50 articles

Top 20 of the Last 2 Weeks

Past Articles
Wednesday, September 01
·Moscow police investigate alleged ransomware gang
·Novell rolls cloud-security service
·More IT managers plan to spend less, survey finds
·Twitter Turns to OAuth for Application Authentication
·Verizon Uses VMware for Enterprise Cloud Service
·Five Things You Need To Know About IPv6
·iPhone 4 with New Antenna Coming Soon?
·Mark Zuckerberg fights to keep life private
·Android Tablet flood is imminent
·Hackers Steal $600,000 from Catholic Diocese
·Pirate Bay secures documentary funding from fans in just 3 days
·Darpa’s Star Hacker Looks to WikiLeak-Proof Pentagon
·Hackers Focus on Misconfigured Networks, Survey Finds
·Australian ban on PS3 hack extended to September 3
·Apple to offer live video stream of Wednesday's keynote
·US finally reforming its high-tech export control system
Tuesday, August 31
·Wikileaks moves servers to an underground nuclear bunker
·Indian e-voting critic released on bail
·Skype might be bought by Cisco
·Commonwealth Bank of Australia security upgrade causes ATM outage
·Google aims to wipe smile off Facebook
·Will Intel's Sandy Bridge pose a threat to discrete GPUs?
·3M to buy security firm Cogent for $943 million
·Microsoft to build giant data center
·Apple still hasn't fixed iPhone 4 proximity sensor bug
·7 skills every IT manager needs to survive the 2010s
·Intel buys wireless chip tech in mobile-phone push
·Hackers Port Android to Nokia Phones
·Old Apple QuickTime code puts IE users in harm's way
·India Could Face Onslaught of Pakistani Hackers, Say Intelligence Officials
 Older articles

Myths about TCP Spoofing
Posted by L33tdawg on Saturday, May 18, 2002 - 10:27 AM (Reads: 80352)
Source:



By: Grandmaster Plague

To many l33t h4x0rs and aspiring hackers, the myth is perpetuated that the surest way to not get caught at whatever it is you're doing on the internet is to "spoof" your IP address. I fully intend to clarify this belief and give examples of when spoofing can be best used.

What is it?

"Spoofing" is a process by which the IP address of your machine is made to appear different from what it really is. The purpose of this is so as to hide your true point of origin. Example: if your real IP is 138.13.233.182 and you spoofed it to 199.199.199.199 then your IP address would show up as 199.199.199.199 in the remote machine's logs, thus your real IP address is unknown. Many newbies (and others) think that if they get a magical "IP Spoofer" program which modifies the Source IP address (and maybe the Source MAC address) field of each outgoing packet that nobody on the Internet will know what their true IP address is.

But wait... The problem with this belief is that TCP (and most other network protocols) is a two-way street. This means that for just about everything you send out to a computer on a network, you expect a response back. This is a problem because if the remote machine thinks that your IP address is 199.199.199.199 and your address is really not, then the machine will try to send information back to that spoofed address and you won't get the information (because it's not your address).

TCP specific

If you still think that you can use IP Spoofing for the "one-way" protocols (like rexec, etc.) on the Internet, think again. The problem is that if you want to be connected to the Internet, your machine must speak TCP/IP. TCP/IP is the foundation for the Internet, thus, every higher level protocol (such as HTTP, FTP, etc.) must use TCP/IP. TCP/IP gets information from point A to point B, what happens when it gets there is the responsibility of higher level protocols. Now, the reason that this is a problem is that TCP has a built in "feature" that makes sure information is going to and from the right place. This is called the "TCP Three-way handshake". Basically, it makes EVERY Internet communication a two-way street.

Here's how it works. Assume machine A and machine B are starting a communication. Machine A says "I'm machine A", machine B responds "I'm machine B, you say you're machine A?", machine A then responds "Yes machine B, I'm machine A". A packet must pass this little test in order to be recieved by machine B. As you can see, all communication on the Internet gets turned into a two-way street.

Two Solutions

There are two simple solutions to this. The first solution is for one way communications, it is called "Blind Spoofing". The theory behind blind spoofing boils down to timing. Essentially, a machine (let's call it XYZ) fakes the TCP three-way handshake by saying "I'm machine FOO", then waiting for a bit as machine B responds to machine FOO, then saying "Yes machine B, I'm machine FOO". Machine FOO won't know what's going on because it will just ignore the packets that machine B sends to it, thinking that machine B is in error, and machine B won't know what's going on because it's receiving responses from machine FOO (which are really coming from machine XYZ).

So, machine XYZ has fooled machine B into thinking that it is really machine FOO and it thus passes the three-way handshake. This can only work well in one-way settings, where it is not necessary that the client get any feedback from the server. An example of this is SMTP. You could blindly spoof your IP address to an SMTP server (to make it think that you're an internal IP), and thus get your mail message sent to someone else with a different originating IP.

The second solution to this is a little bit tricky. It is the best way to spoof when you want information back from the server. This solution is called "Active Spoofing". Active spoofing boils down to Blind spoofing, but at the same time, you are sniffing communications going back to the spoofed host. Use the example above, but you are also sniffing the packets going from machine B to machine FOO. In order for this to work, you must either be on the same hubbed subnet as machine FOO, or you can do some route table modification to get the information to pass through your machine. You then watch what machine B sends to machine FOO for the entire session. This is an extremely complicated process and changes from protocol to protocol. Currently, I am not aware of any tools that automate this process.

Conclusion

Spoofing isn't really all it's cracked up to be. It isn't the be all to end all of covering your tracks. It does have it's interesting uses (sending fake mail, rexec, and more), but is extremely difficult to implement if you want information back from the target host. If you really want to cover your tracks, it's better to route all your traffic through some wingates (or something). There are loads of IP spoofers out there some are more useful than others. If you want to hack up your own spoofer you can use rawsocks. Alternately, you can use spoof (a spoofing library) availible at: http://kalug.lug.net/coding/nettools/index.html. This code includes sample. For more information on spoofing, read _Hack_Proofing_Your_Network_ availible from Syngress Books (Chapter 11 is all about spoofing) it's really a great read, I recommend it.



1.) Dumpster Diving - One Man's Trash - Grifter
2.) Ham Radio: An Introduction - A
3.) Pirate Radio - Manic Velocity
4.) Hacking by Numbers - madirish
5.) Authentication protocols and there weaknesses - Chernobyl Chickun
6.) Remote access and Security - Mark Jorgensen & Neil H Watson
7.) Myths about TCP Spoofing - Grandmaster Plague

(Printer-friendly page Send this story to someone)

 
Top 10 Articles from the last 2 weeks for Articles

· Articles Postings

· Postings by L33tdawg


Login
 



 


 Log in Problems?
 New User? Sign Up!

HITB eZine Issue 003

Last 15 Postings to HITB Forum

Topics
· All topics
· AMD News (Aug 10, 2010)
· Apple News (Sep 02, 2010)
· Articles (Mar 03, 2009)
· Ask Us (Feb 01, 2003)
· Audio/Video (Sep 01, 2010)
· Encryption (Aug 30, 2010)
· Games (Aug 27, 2010)
· Hardware (Sep 01, 2010)
· HITB News (Aug 19, 2010)
· Industry News (Sep 02, 2010)
· Intel News (Aug 31, 2010)
· Law and Order (Sep 02, 2010)
· Linux (Aug 30, 2010)
· Microsoft (Sep 02, 2010)
· Networking (Sep 01, 2010)
· PDAs (Feb 09, 2007)
· Privacy (Sep 02, 2010)
· Red Hat (Mar 30, 2010)
· Science (Aug 30, 2010)
· Security (Sep 02, 2010)
· Software & Programming (Sep 02, 2010)
· Spam (Sep 01, 2010)
· Technology (Aug 30, 2010)
· Transmeta (Jul 07, 2007)
· Viruses & Malware (Sep 02, 2010)
· Wireless (Aug 26, 2010)

Packet Storm Security Latest
· nullconGoa2011-CFP.txt
The Call For Papers for nullcon Dwitiya 2.0 is now open. It takes place February 25th through the 26th, 2011 in Goa, India.
· amirocmsfaq-xss.txt
Amiro.CMS version 5.8.4.0 suffers from a stored cross site scripting vulnerability.
· advanced-xss.pdf
Whitepaper called Advanced XSS. Written in Arabic.
· moaub01-cpanel.pdf
Month Of Abysssec Undisclosed Bugs - Cpanel suffers from a PHP restriction bypass vulnerability. Versions 11.25 and below are affected.
· moaub01-adobe.pdf
Month Of Abysssec Undisclosed Bugs - Adobe Acrobat Reader and Flash Player suffer from a newclass invalid pointer vulnerability.
· MDVSA-2010-168.txt
Mandriva Linux Security Advisory 2010-168 - Double free vulnerability in the ssl3_get_key_exchange function in the OpenSSL client in OpenSSL 1.0.0a, 0.9.8, 0.9.7, and possibly other versions, when using ECDH, allows context-dependent attackers to cause a denial of service and possibly execute some sources refer to this as a use-after-free issue. The updated packages have been patched to correct this issue.
· ZSL-2010-4961.txt
LEADTOOLS version 16.5.0.2 suffers from buffer overflow, integer overflow and denial of service vulnerabilities related to Active-X Common Dialogs.
· cpanelcp-xss.txt
cPanel Customer Portal suffers from a cross site scripting vulnerability.

Follow us
Join our Facebook Group

Follow us on Twitter

Follow our RSS feed


HITB Affiliates

Page created in 0.818809986115 seconds.