soma 50 mg get get levitra online soma daily propecia canada 5mg get quick delivery propecia levitra cheap delivery get tramadol online cialis daily formula best phentermine online propecia suppliers phentermine for sale in usa now acomplia no prescription generic daily cialis usa will acomplia work now buy propecia usa phentermine canadian pharmacy cheap buy phentermine sales canadian propecia delivery canada acomplia cialis without a prescription online cialis daily generic soft phentermine canadian pharmacy viagra specials now soma suppliers buy discount cialis cheap natural phentermine soma by mail usa the best acomplia in us viagra on line acomplia scam buy acomplia generic canada real viagra soma for sale female phentermine pills acomplia without a prescription once daily tramadol canadian pharmacy acomplia buying viagra without prescription phentermine purchase now canadian pharmacy levitra discounts tramadol without prescription cialisis cheap generic tramadol next day shipping now propecia 20 mg best prices on generic soma sale viagra generic canada levitra daily formula canada cialis by mail buy acomplia sales quick delivery cialis usa quick delivery tramadol tramadol daily acomplia without prescription propecia daily formula once daily soma get buy cialis on line generate viagra canadian pharmacy propecia without prescription canada phentermine generic canada viagra how fast does it work daily soma fast where to get acomplia acomplia from china acomplia canada online propecia generic no rx canada discount generic acomplia sale cialis daily soma canadian pharmacies viagra sales online fast generic daily propecia propecia one a day sales buying acomplia without prescription now phentermine no prescription online inexpensive viagra discounts best prices on generic cialis soma without a prescription buy propecia on line sales tramadol daily generic get where to purchase soma sales buy propecia online phentermine sur le net get buy tramadol on line usa propecia 100 mg delivery daily levitra daily cialis buy soma usa sale daily tramadol viagra soft tabs once daily levitra viagra for women levitra daily canada once daily cialis viagra mexico sales generic cialis next day shipping tramadol name brand pills how much does tramadol cost delivery soma sales quick delivery levitra phentermine soft tabs buy propecia 50 mg cheap acomplia sales tramadol 50 mg discount levitra discounts viagra samples levitra daily generic discount generic viagra delivery overnight delivery phentermine delivery viagra purchase get which online sell real propecia discounts phentermine samples tramadol cost buy viagra without prescription viagra online without prescription best generic propecia how do you get prescription acomplia without prescription online levitra 20 mg propecia cheap sales get soma online viagra canadian india get natural acomplia cheap phentermine canada no rx levitra online generic acomplia canada soma cheap non prescription acomplia buying viagra in canada tramadol soft tabs usa how do you get prescription viagra without prescription canadian soma now cialis daily online sales buy levitra without prescription propecia daily buy acomplia without prescription levitra canada online pharmacy sales virtual med store propecia generic tramadol from india phentermine without a prescription soma daily generic phentermine aus den usa phentermine how fast does it work viagra from china fast soma canada online pharmacy usa tramadol 5mg sale phentermine canada online purchase buy cialis usa viagra in india cialis order discounts canadian pharmacy phentermine canada cialis generic no rx soma one a day soma daily price canadian pharmacy cialis without prescription no rx tramadol acomplia canadian delivery propecia name brand pills overnight delivery viagra cheap canadian phentermine best prices on generic tramadol soma specials acomplia 50 mg canada pharm viagra inexpensive acomplia levitra cost tramadol price female acomplia pills will viagra work get canadian pharmacy propecia soma name brand pills levitra canadian pharmacies tramadol specials discount tramadol buy soma on line now levitra order canadian pharmacy soma viagra soft usa how much does propecia cost delivery canadian cialis cialis specials discounts discount viagra sale propecia specials cialis for sale generate phentermine cheap female phentermine levitra by mail sale best viagra online tramadol canadian pharmacies delivery viagra sale phentermine on line delivery cheap phentermine no prescription viagra dose acomplia on line sales phentermine for women canadian pharmacy soma without prescription cheap acomplia cheap fast phentermine canadian india buy canadian pharmacy viagra sales tramadol order generic propecia now buy phentermine for cheap generic daily levitra soma without prescription phentermine sale cheap viagra canadian acomplia soft tabs usa acomplia in india buy acomplia dose non prescription viagra discounts get propecia online generic levitra from india buy once daily propecia levitra daily online phentermine for sale usa acomplia sale usa tramadol daily formula sale generic soma next day shipping viagra tablets soma 5mg acomplia scams online cheap viagra no prescription canada pharm phentermine cheap viagra canada soft viagra online tramadol suppliers discounts soft acomplia acomplia and cialis acomplia sur le net buy levitra online buy cialis cheap tramadol 100 mg viagra sur le net soma pound natural viagra cheap viagra without a prescription cheap buy viagra for cheap cheap female acomplia fast where to purchase tramadol viagra canadian pharmacy canada canadian pharmacy cialis no rx cialis online canadian fast viagra for sale in usa where to get phentermine phentermine 50 mg delivery cialis 50 mg levitra 50 mg buy buy real acomplia online with no prescription generic propecia from india canada which online sell real levitra viagra canada cheapest viagra without prescription usa female viagra pills cialis daily price levitra generic no rx buy phentermine sales get prescription phentermine canada tramadol cheap online acomplia for sale canadian pharmacy acomplia specials propecia daily generic propecia for sale fast canadian viagra cialis canada online pharmacy sale tramadol daily online cialis canadian pharmacies canada levitra specials canadian acomplia acomplia online without prescription levitra sales daily propecia acomplia purchase real acomplia now soma cost usa cialis sales viagra 100 mg generic cialis canadian propecia sales propecia by mail cheap buy tramadol online viagra on special levitra canada 5mg sales cialis 5mg buy viagra fast real phentermine soma order the best viagra in us delivery where to get viagra cialis suppliers best generic levitra viagra scam fast best generic tramadol cialis canada 5mg cheap levitra soft tabs now propecia without a prescription fast acomplia aus den usa cialis 100 mg buy canadian pharmacy tramadol usa soft gel acomplia soma daily online discount acomplia cialis 20 mg fast propecia canadian pharmacies acomplia for women viagra canada online purchase fast buy acomplia from canada propecia 5mg sale virtual med store levitra generic daily tramadol non prescription phentermine how much does levitra cost discounts tramadol daily price fast phentermine dose levitra daily price soma price discount phentermine acomplia tablets canada pharm acomplia viagra sales sales cheap viagra usa generate acomplia acomplia canada online purchase phentermine from china phentermine tablets buy cheap acomplia usa levitra price canada viagra get cialis one a day levitra name brand pills propecia daily online cialis soft tabs discount generic phentermine tramadol generic no rx now canada phentermine usa soma generic no rx prescription viagra canada sale virtual med store tramadol generic propecia next day shipping now how much does cialis cost buy the best phentermine in us phentermine sales online propecia price generic daily soma canadian tramadol levitra 100 mg discount soma buy propecia without prescription how do you get prescription phentermine without prescription fast how much does soma cost tramadol sales viagra cheap fast usa best acomplia online sale viagra for sale sales best prices on generic propecia buy real phentermine online with no prescription phentermine scam acomplia canadian pharmacy viagra propecia pills tramadol one a day buy cialis without prescription buy tramadol usa sales acomplia mexico buy soft gel viagra phentermine cheap which online sell real cialis canadian pharmacy levitra without prescription canadian levitra sales levitra one a day usa no rx soma buy generic viagra canada generic levitra buying phentermine in canada virtual med store cialis soma pills acomplia for sale in usa fast tramadol 20 mg cheap phentermine online without prescription usa buy levitra usa generic phentermine canada phentermine and cialis cheap phentermine usa which online sell real soma online levitra without a prescription best generic soma buy best prices on generic levitra propecia sales phentermine in india where to purchase levitra sale phentermine canadian buy phentermine without prescription online best generic cialis cialis pound buy soma online discounts phentermine delivery soma soft tabs buy levitra on line cheap generic soma sale levitra suppliers online tramadol pound fast generic cialis from india generic soma from india cialis name brand pills online buy tramadol without prescription delivery buy real viagra online with no prescription viagra no prescription propecia pound canadian tramadol sales usa acomplia professional viagra scams buy levitra without prescription acomplia sales online discounts canadian cialis sales phentermine soft phentermine scams fast cheap acomplia no prescription buy viagra from canada buy phentermine from canada get levitra pills virtual med store soma canada cheap viagra tramadol by mail cheapest acomplia without prescription viagra aus den usa online tramadol pills sales buying phentermine without prescription discounts propecia without prescription now acomplia canadian india acomplia how fast does it work buy acomplia for cheap cheap phentermine on special which online sell real tramadol discounts cialis cost cheap acomplia soft cheapest phentermine without prescription soma canada 5mg usa canadian pharmacy tramadol without prescription acomplia sales usa delivery overnight delivery acomplia usa tramadol without a prescription discounts levitra 5mg soma daily formula cheap acomplia tramadol canada 5mg delivery levitra for sale no rx propecia usa phentermine mexico delivery cialis without prescription discounts soft gel phentermine canada phentermine 100 mg usa where to purchase propecia discount propecia tramadol for sale buy cialis online sale acomplia samples acomplia delivery now buy soma without prescription prescription acomplia canada cheap phentermine propecia canada online pharmacy propecia order now phentermine cheap fast viagra delivery get cialis online sale viagra without prescription sale canadian soma sales canadian levitra sales sale cheap acomplia canada get inexpensive phentermine usa quick delivery soma phentermine without prescription sale phentermine canada cheap viagra from canada sales phentermine sales usa online canadian pharmacy phentermine specials buying acomplia in canada will phentermine work buy acomplia on special sales viagra 50 mg cheap female viagra cheap propecia cost cheap cialis pills where to purchase cialis viagra and cialis online viagra professional online cialis price propecia soft tabs cheap generic levitra next day shipping viagra sales usa sale phentermine professional soma 20 mg cheap phentermine from canada tramadol canada online pharmacy delivery propecia daily price cheap acomplia from canada levitra pound soma 100 mg cheap generic tramadol discounts

 

November 22, 2007

IP Spoofing

Filed under: Server Security — @ 1:15 pm

ATTACKS USING IP SPOOFING

IP-spoofing is complex technical attack that is made up of several components. In actuality, IP-spoofing is not the attack, but a step in the attack. The attack is actually trust-relationship exploitation.

IP-spoofing consists of several steps. First, the target host is chosen. Next, a pattern of trust is discovered, along with a trusted host. The trusted host is then disabled, and the target’s TCP sequence numbers are sampled. The trusted host is impersonated, the sequence numbers guessed, and a connection attempt is made to a service that only requires address-based authentication. If successful, the attacker executes a simple command to leave a backdoor.

IP-Spoofing is a ‘Blind Attack’

As far as the target knows, it is carrying on a conversation with a trusted pal. The attacker is forging packets purportedly from this trusted host while it is locked up in a denial of service battle. The IP datagram’s sent with the forged IP-address reach the target fine but the datagram’s the target sends back (destined for the trusted host) end up in the bit-bucket. The attacker never sees them. The intervening routers know where the datagram’s are supposed to go. But it is discarded because the trusted host’s TCP cannot respond because it is under attack. So the attacker has to be smart and *know* what was sent, and *know* what response the server is looking for. The attacker cannot see what the target host sends, but she can *predict* what it will send; that coupled with the knowledge of what it *will* send, allows the attacker to work around this blindness.

Patterns of Trust

After a target is chosen the attacker must determine the patterns of trust (for the sake of argument, we are going to assume the target host *does* in fact trust somebody. If it didn’t, the attack would end here). Figuring out who a host trusts may or may not be easy. A ’showmount -e’ may show where file systems are exported, and rpcinfo can give out valuable information as well. If enough background information is known about the host, it should not be too difficult. If all else fails, trying neighboring IP addresses in a brute force effort may be a viable option.
Trusted Host Disabling Using the Flood of Sins
Once the trusted host is found, it must be disabled. Since the attacker is going to impersonate it, she must make sure this host cannot receive any network traffic and foul things up. There are many ways of doing this, and one such technique is TCP SYN flooding.
A TCP connection is initiated with a client issuing a request to a server with the SYN flag on in the TCP header. Normally the server will issue a SYN/ACK back to the client identified by the 32-bit source address in the IP header. The client will then send an ACK to the server (as we saw in figure 1 above) and data transfer can commence. There is an upper limit of how many concurrent SYN requests TCP can process for a given socket, however. This limit is called the backlog, and it is the length of the queue where incoming (as yet incomplete) connections are kept. This queue limit applies to both the number of incomplete connections (the 3-way handshake is not complete) and the number of completed connections that have not been pulled from the queue by the application by way of the accept() system call. If this backlog limit is reached, TCP will silently discard all incoming SYN requests until the pending connections can be dealt with. Therein lies the attack.
The attacking host sends several SYN requests to the TCP port she desires disabled. The attacking host also must make sure that the source IP-address is spoofed to be that of another, currently unreachable host (the target TCP will be sending it’s response to this address. (IP may inform TCP that the host is unreachable, but TCP considers these errors to be transient and leaves the resolution of them up to IP (reroute the packets, etc) effectively ignoring them.) The IP-address must be unreachable because the attacker does not want any host to receive the SYN/ACKs that will be coming from the target TCP (this would result in a RST being sent to the target TCP, which would foil our attack).
Sequence Number Sampling and Prediction
Now the attacker needs to get an idea of where in the 32-bit sequence number space the target’s TCP is. The attacker connects to a TCP port on the target (SMTP is a good choice) just prior to launching the attack and completes the three-way handshake. The process is exactly the same as fig (1), except that the attacker will save the value of the ISN sent by the target host. Often times, this process is repeated several times and the final ISN sent is stored. The attacker needs to get an idea of what the RTT (round-trip time) from the target to her host is like. (The process can be repeated several times, and an average of the RTT’s is calculated.) The RTT is necessary in being able to accurately predict the next ISN. The attacker has the baseline (the last ISN sent) and knows how the sequence numbers are incremented (128,000/second and 64,000 per connect) and now has a good idea of how long it will take an IP datagram to travel across the Internet to reach the target (approximately half the RTT, as most times the routes are symmetrical). After the attacker has this information, she immediately proceeds to the next phase of the attack (if another TCP connection were to arrive on any port of the target before the attacker was able to continue the attack, the ISN predicted by the attacker would be off by 64,000 of what was predicted).
When the spoofed segment makes it’s way to the target, several different things may happen depending on the accuracy of the attacker’s prediction:
If the sequence number is EXACTLY where the receiving TCP expects it to be, the incoming data will be placed on the next available position in the receive buffer.
If the sequence number is LESS than the expected value the data byte is considered a retransmission, and is discarded.
If the sequence number is GREATER than the expected value but still within the bounds of the receive window, the data byte is considered to be a future byte, and is held by TCP, pending the arrival of the other missing bytes. If a segment arrives with a sequence number GREATER than the expected value and NOT within the bounds of the receive window the segment is dropped, and TCP will send a segment back with the *expected* sequence number.
Here is where the main thrust of the attack begins:
Fig (3)

1 Z (b) —SYN—> A

2 B <—SYN/ACK— A

3 Z (b) —ACK—> A

4 Z (b) —PSH—> A

[…]
The attacking host spoofs her IP address to be that of the trusted host (which should still be in the death-throes of the D.O.S. attack) and sends it’s connection request to port 513 on the target (1). At (2), the target responds to the spoofed connection request with a SYN/ACK, which will make it’s way to the trusted host (which, if it *could* process the incoming TCP segment, it would consider it an error, and immediately send a RST to the target). If everything goes according to plan, the SYN/ACK will be dropped by the gagged trusted host. After (1), the attacker must back off for a bit to give the target ample time to send the SYN/ACK (the attacker cannot see this segment). Then, at (3) the attacker sends an ACK to the target with the predicted sequence number (plus one, because we’re ACKing it). If the attacker is correct in her prediction, the target will accept the ACK. The target is compromised and data transfer can commence (4).
Generally, after compromise, the attacker will insert a backdoor into the system that will allow a simpler way of intrusion.. This is a good idea for several reasons: it is quick, allows for simple re-entry, and is not interactive. Remember the attacker cannot see any traffic coming from the target, so any Responses are sent off into oblivion.)

Article Authored by Jomon

Author, Jomon, is a Systems Engineer with SupportPRO. Jomon specializes in Cpanel  servers. SupportPRO offers 24X7 technical support services to Web hosting companies and service providers.

AddThis Social Bookmark Button

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress