Around The Globe ATG.WORLD

Visit our sister website :

http://www.atg.world/

This is a social network for enthusiasts just like us. No Junk! Only meaningful conversations with the people who share the same enthusiasm as us.

Around The Globe ATG.WORLD

Visit our sister website :

http://www.atg.world/

This is a social network for enthusiasts just like us. No Junk! Only meaningful conversations with the people who share the same enthusiasm as us.
Showing posts with label DOS Attack. Show all posts
Showing posts with label DOS Attack. Show all posts

Monday, June 20, 2011

SWITCHPORT PORT-SECURITY : Lock Down Security on Cisco Switches

Hello everyone, its been ages since I have posted on this blog. Sorry!! Mainly because, my focus shifted from Security to Networking, because I realized I gotta master Networking first to be a Security Professional. So, I have cleared CCNA, CCNA Security, CCNP ROUTE in the meanwhile and I am currently studying for CCNP SWITCH right now.
I wish to share an awesome feature of Cisco Switches - SwitchPort Security.

NEED ::


Wireless Networking has changed the face of the Switch Security. Until now, we believed that the only way to break into the network was through the Internet. Because the Wireless Access Points defaults to no security and allow anyone to connect to the Enterprise Network, SwitchPort Security was essential to limit who can and who cannot connect to the Switch Ports and access the Network.

A growing challenge facing network administrators is determining how to control who can access the organization’s internal network — and who can’t. For example, can anyone walk into your office, plug in a laptop, and access your network? Moreover, in today's network, needless to say, you donot trust each of your employees. And if none of the above two scenarios is correct, it may be an infected PC that is generating a broadcast storm or generating frames from thousand different MAC addresses to populate Switch's CAM (Content Addressable Memory) table and turn the Switch into a miserable Hub.


Understand the basics

In its most basic form, the Port Security feature remembers the Ethernet MAC address connected to the switch port and allows only that MAC address to communicate on that port. If any other MAC address tries to communicate through the port, port security will take an action configured by you, which is either ignoring the packet from unknown MAC address or disabling the port. Most of the time, network administrators configure the switch to send a SNMP trap to their network monitoring solution that the port’s disabled for security reasons.


Of course, implementing any security solution always involves a trade-off — most often, you trade increased security for less convenience. When using port security, you can prevent devices from accessing the network, which increases security.


Configure port security


Configuring the Port Security feature is relatively easy. In its simplest form, port security requires going to an already enabled switch port and entering the port-security Interface Mode command. Here’s an example:


Switch)# config t
Switch(config)# int fa0/18
Switch(config-if)# switchport port-security ?
aging Port-security aging commands
mac-address Secure mac address
maximum Max secure addresses
violation Security violation mode

Switch(config-if)# switchport port-security
Switch(config-if)#^Z

By entering the most basic command to configure port security, we accepted the default settings of only allowing one MAC address, determining that MAC address from the first device that communicates on this switch port, and shutting down that switch port if another MAC address attempts to communicate via the port. But you don’t have to accept the defaults.


Know your options

As you can see in the example, there are a number of other port security commands that you can configure. Here are some of your options:
  • switchport port-security maximum {max # of MAC addresses allowed}: You can use this option to allow more than the default number of MAC addresses, which is one. For example, if you had a 12-port hub connected to this switch port, you would want to allow 12 MAC addresses — one for each device. The maximum number of secure MAC addresses per port is 132.


  • switchport port-security violation {shutdown | restrict | protect}: This command tells the switch what to do when the number of MAC addresses on the port has exceeded the maximum. The default is to shut down the port. However, you can also choose to alert the network administrator (i.e., restrict) or only allow traffic from the secure port and drop packets from other unknown MAC addresses (i.e., protect).

  • switchport port-security mac-address {MAC address}: You can use this option to manually define the MAC address allowed for this port rather than letting the port dynamically determine the MAC address.

Of course, you can also configure port security on a range of ports. Here’s an example:
Switch)# config t
Switch(config)# int range fastEthernet 0/1 - 24
Switch(config-if)# switchport port-security
However, you need to be very careful with this option if you enter this command on an uplink port that goes to more than one device. As soon as the second device sends a packet, the entire port will shut down.


View the status of port security


Once you’ve configured port security and the Ethernet device on that port has sent traffic, the switch will record the MAC address and secure the port using that address. To find out the status of port security on the switch, you can use the show port-security address and show port-security interface commands. Below are examples for each command’s output:


Switch# show port-security address
Secure Mac Address Table
-------------------------------------------------------------------
Vlan Mac Address Type Ports Remaining Age
(mins)
---- ----------- ---- ----- -------------
1 0004.00d5.285d SecureDynamic Fa0/18 -
-------------------------------------------------------------------
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 1024

Switch# show port-security interface fa0/18
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 0
Sticky MAC Addresses : 0
Last Source Address : 0004.00d5.285d
Security Violation Count : 0

Switch#

For more information on switch port commands and configuring the Port Security feature, check out Cisco’s Enabling Port Security documentation for the Catalyst 2950. What steps have you taken to lock down switch port security? Share your tips in this article’s discussion.

Wednesday, August 26, 2009

LAND Attack

"A LAND attack involves IP packets where the source and destination address are set to address the same device."

In a LAND attack, the attacker sends infinite packets to the victim system from the victim system itself i.e spoofing the TCP SYN packet with the target host's IP address and using an open port as both source and destination.

The attack involves sending a spoofed TCP SYN packet with the target host's IP address and an open port as both source and destination. The same source and target address and port number crashes the victim system. The reason a LAND attack works is because it causes the machine to reply to itself continuously.

Other land attacks have since been found in services like SNMP and Windows 88/tcp (kerberos/global services) which were caused by design flaws where the devices accepted requests on the wire appearing to be from themselves and causing replies repeatedly.

PING OF DEATH

The maximum packet size allowed to be transmitted by TCP/IP on a network is 65536(2^16-1) bytes.

In the Ping of Death (POD) Attack, a packet having a size greater than this maximum size allowed by TCP/IP, is sent to the target system. As soon as the target system receives a packet exceeding the allowable size, then it crashes, reboots or hangs.

This attack can easily be executed by the ‘ping’ command as follows:
ping -l 65540 hostname
This exploit has affected a wide variety of systems, including Unix, Linux, Mac, Windows, printers, and routers. However, most systems since 1997-1998 have been fixed, so this bug is mostly historical. The only solution is to secure the kernel against overflow when reconstructing IP fragments.

If your system is still vulnerableb to this attack, it will crash upon running this command:
ping -l 65510 your.host.ip.address

Saturday, August 8, 2009

Stacheldraht

Stacheldraht (German for barbed wire) is a piece of software written by Random for Linux and Solaris systems which acts as a distributed denial of service (DDoS) agent. The tool detects and automatically enables source address forgery.

Stacheldraht uses a number of different DoS attacks, including: UDP flood, ICMP flood, TCP SYN flood and Smurf attack.

It combines features of Trinoo with TFN, and adds encryption.

Stable release 4
Written in C
Operating system Linux, Solaris
Size
36 kb

DOWNLOAD Stacheldraht v4 at Download Mall

Friday, August 7, 2009

USING TRINOO

The trinoo distributed denial-of-service system consists of 3 parts:

The Client: The client is not part of the trinoo package. The telnet or Netcat program is used to connect to port 27665 of the "master." An attacker connects to a master to control the "broadcasts" that will flood a target.

The Master: The master is contained in the file master.c in the trinoo package. While running, it waits for UDP packets going to port 31335. These packets are registration packets from the "broadcast." It also waits for connections to TCP port 27665. When a client connects to port 27665, the master expects the password to be sent before it returns any data. The default password is "betaalmostdone". When the master is run, it displays a "?" prompt, waiting for a password. The password is "gOrave".

The Broadcast (or Beast): The broadcast is the code in trinoo that performs the actual flooding. It is ns.c in the trinoo package. When the broadcast is compiled, the IP addresses of the masters that can control it are hardcoded into the program. Starting the broadcast, a UDP packet is sent to port 31335 of each master IP, containing the data "*HELLO*". This packet registers the broadcast with the master. An attacker can then connect to the master and use the daemons to send a UDP flood.



There are six commands that a client can send to the master to cause the master to communicate with the broadcast. A master sending commands to a broadcast sends a UDP packet to port 27444 of the broadcast. The default password between the master and the broadcast daemon is "l44adsl". These are the six commands the client sends to the master:

- - mtimer: Sets a timer to DoS a target. The master sends a "bbb" command to the broadcast. This packet looks like: "bbb l44adsl 300" when observed on the network.

- - dos: Performs a Denial of Service attack on a machine. The dos command sends an "aaa" command to the broadcast. This packet looks like: "aaa l44adsl 10.1.1.1" when observed on the network.

- - mdie: Kills all broadcasts. An attacker cannot use this command when connected to the master unless an additional password is known, but an attacker can send their own UDP packet with the master-broadcast password ("l44adsl") to kill each of the broadcasts. The master then sends a "d1e" command to the broadcast daemon. This packet looks like: "d1e l44adsl" when observed on the network.

- - mping: Pings all broadcasts. The master sends a "png" command to each broadcast, and the broadcast returns with a "PONG" packet sent to UDP port 31335 of the master. When this packet is transmitted from the master to the broadcast daemon, it looks like: "png 144 adsl".

- - mdos: This command performs a Denial of Service attack on a list of machines. The master sends a "xyz" command to each broadcast. The packet looks like "xyz l44adsl 123:10.1.1.1:10.1.1.2:10.1.1.3:".

- - msize: This command sets the size of the UDP packets to use when performing a Denial of Service attack on a target. It is undocumented in the master's online help system. The master sends a "rsz" command to the broadcast daemon, and the packet looks like "rsz l44adsl 300".

The DoS attack that trinoo broadcasts use is a UDP flood. Trinoo sends a large number of UDP packets containing 4 data bytes (all zeros) and coming from one source port to random destination ports on the target host. The target host returns ICMP Port Unreachable messages. The target host slows down because it is busy processing the UDP packets, and at this point, there will be little or no network bandwidth left.

There is no reliable way to tell the difference between a trinoo flood and a UDP port scan, because it is not possible to determine if someone is monitoring the ICMP messages.


DOWNLOAD TRINOO

Wednesday, August 5, 2009

Win Anti Zomb [WAZ] - Anti dDOS tool

WAZ [ Win Anti Zomb ]
Windows Based Anti Zombie Tool.

SecNiche Security [http://www.secniche.org]

WAZ is windows based Anti DDos tool written in VC++ and VC[API]. It comprise of anti symmetric ailment for the most devastating DDos agents termed to be as Zombie Agents. The tools are designed to serve the windows platform and to provide an ease to the users.

The tool is functional and effective in stopping the Ddos agents. You can find lots of Ddos agents like Trinoo, Shaft, Stacheldraht, Mstream etc. They are considered to be the best agents to launch distributed denial of service attacks.

The WAZ consists of : waz_tester.exe & waz_killer.exe

The malformed UDP packets with desired signatures are crafted and sent to the Zombie victim to dethrone the functionality of zombie agents. A test was taken using WireShark.


DOWNLOAD WAZ [Direct Download Links]

waz(v 1.0)-win-anti-zomb.rar | waz(v 1.0)-win-anti-zomb.zip
Visit the SecNiche Security [http://www.secniche.org] to download latest software!!

TRINOO

Trinoo (TrinOO) was the first DDOS tool to be discovered. Trinoo uses a handler/agent architecture, wherein an attacker sends commands to the handler via TCP and handlers and agents communicate via UDP. Trinoo generates UDP packets of a given size to random ports on one or multiple target addresses, during a specified attack interval. Targets include systems running various services known to have remotely exploitable buffer overflow security bugs, such as wu-ftpd, RPC services for "cmsd", "statd", "ttdbserverd", "amd", etc.

Trinoo provides the ability for attackers to set up the denial of service network, on widely dispersed systems whose true owners don't even know are out of their control.

Trinoo uses the following TCP Ports for its operation:
Attacker to master: 27665/tcp
Master to daemon(slave): 27444/udp
Daemon(slave) to master: 31335/udp
Daemons reside on the systems that launch that the attack, and masters control the daemon systems. Since Trinoo uses TCP, it can be easily detected and disabled.



DOWNLOAD TRINOO

Related Posts :
USING TRINOO

Distributed denial-of-service (DDoS) Attack

"This post explains DDoS attacks in detail, and also highlights the comparison & advantages over DoS Attacks"

DDoS Attack

A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a computer resource unavailable to its intended users.

  • DDoS attacks require engagement of multiple machines, which will be sending the attack traffic to the victim.
  • The attacking machines donot belong to the attacker and are frequently called zombies, daemons, slaves, or agents.
  • Agents(Zombies) are usually poorly secured systems at universities, companies, and homes—even at government institutions.
  • The attacker breaks into them, takes full control, installs DDoS software on them and launch coordinated attacks them for the attack.
  • Automated tools discover potential agent machines, break into them, and install the attack code upon a single command from an attacker, and report success back to her.
  • The master program, at a designated time, then communicates to any number of "agent" programs, installed on computers anywhere on the Internet. The agents, when they receive the command, initiate the attack.
  • This makes it difficult to detect because attacks originate from several IP addresses.
  • If a single IP address is attacking a company, it can block that address at its firewall. If it is 30000 this is extremely difficult.
TOOLS : Shaft, Trinoo, Tribe Flood Network (TFN), Stacheldraht, Tribe Flood Network 200 (TFN2K)

Friday, July 31, 2009

SMURF Attack

A broadcast server is a server capable of duplicating a message and sending it to all machines present on the same network. The "smurf" technique is based on the use of broadcast servers to paralyze a network

The scenario of such an attack is as follows:

  • the attacking machine sends forged packets that contain the spoofed source address of the attacker's intended victim (i.e. providing the IP address of a target machine) to one or more broadcast servers.
  • the broadcast server passes on the request to the entire network
  • all of the network's machines send a response to the broadcast server
  • the broadcast server redirects the responses to the target machine.
As such, when the attacking machine sends a request to several broadcast servers located on different networks, all of the responses from computers on the various networks will be routed to the target machine.

Denial-of-service by SMURF

In this way the bulk of the attacker's work involves finding a list of broadcast servers and falsifying the response address in order to direct them to the target machine.

Thursday, July 30, 2009

SYN FLOOD

Prerequisite : In order to understnad a SYN Flood completely, you must understand the TCP-IP 3-way HandShake

A SYN packet notifies a server of a new connection. The server then allocates some memory in order to handle the incoming connection, sends back an acknowledgement, then waits for the client to complete the connection and start sending data. By spoofing large numbers of SYN requests, an attacker can fill up memory on the server, which will sit their waiting for more data that never will arrive. Once memory has filled up, the server will be unable to accept connections from legitimate clients. This effectively disables the server.

Key point: SYN floods exploit a flaw in the core of the TCP/IP technology itself. There is no complete defense against this attack. There are, however, partial defenses. Servers can be configured to reserve more memory and decrease the amount of time they wait for connections to complete. Likewise, routers and firewalls can filter out some of the spoofed SYN packets. Finally, there are techniques (such as "SYN cookies") that can play tricks with the protocol in order to help distinguish good SYNs from bad ones.


SYN Flood. The attacker sends several packets but does not send the "ACK" back to the server. The connections are hence half-opened and consuming server resources. Alice, a legitimate user, tries to connect but the server refuses to open a connection resulting in a denial of service.


The CERT advisory on SYN Flooding includes an up-to-date list of the vendors who have patches for this attack. All server systems are vulnerable unless patched if traffic from the Internet (or any hostile network) are permitted.

How does a DOS attack works - Behind the Scenes


There are two main approaches to denying a service:


a FLOODING ATTACK, sending a vast number of seemingly legitimate messages.
&
a VULNERABILITY ATTACK, exploiting a vulnerability present on the target


FLOODING ATTACK :
Flooding or Bandwidth attacks are attempts to consume resources, such as network bandwidth or equipment throughput. High-data-volume attacks can consume all available bandwidth between an ISP and your site. The link fills up, and legitimate traffic slows down. Timeouts may occur, causing retransmission, generating even more traffic.

Flooding attacks work by sending a vast number of messages whose processing requires the server to allocate some key resource at the target. Once the server allocates its key resource to the attack, legitimate users cannot receive service. The crucial feature of flooding attacks is that their strength lies in the volume, so the flow of traffic must be so large as to consume the target's resources. If the attacker engages more than one machine to send out the attack traffic, then it is known as a DDoS attack.
Techniques : SYN Flood, Smurf, Fraggle


VULNERABILITY ATTACKS : Malicious messages by the attacker represent an unexpected input that the application programmer did not foresee. The messages cause the target application to go into an infinite loop; to severely slow down, crash, freeze, or reboot a machine; or to consume a vast amount of memory and deny service to legitimate users.
Techniques : teardrop, land, ping of death, Naptha

Denial of Service (DOS) Attack

A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a computer resource unavailable to its intended users. During a Denial of Service (DoS) attack, a hacker renders a system unusable or significantly slows the system by over-loading resources or preventing legitimate users from accessing the system. This denial-of-service effect is achieved by sending messages to the target that interfere with its operation, and make it hang, crash, reboot, or do useless work.

The goal of DoS or DDoS isn’t to gain unauthorized access to machines or data, but to prevent legitimate users of a service from using it.
A DoS attack may do the following:
 Flood a network with traffic, thereby preventing legitimate network traffic.
 Disrupt connections between two machines, thereby preventing access to a service.
 Prevent a particular individual from accessing a service.
 Disrupt service to a specific system or person.

Both DoS and DDoS attacks are hard to handle. Defenses (firewalls, IDS, closed ports, patches updated) that work well against many other kinds of attacks are not necessarily effective against denial of service. The attack can consist of traffic that the firewall finds acceptable, probably because it bears a close resemblance to legitimate traffic. Since the DoS attack merely needs to exhaust resources, it can work on any port left open. Attackers can perform DoS attacks on machines that have no vulnerabilities, so patches to close vulnerabilities may not help.

Techniques : SYN Flood, Smurf, teardrop, land, ping of death
Tools : SSPing, Land Exploit, Smurf, Syn Flood, Jolt2, WinNuke, Targa


Related Posts :
Distributed denial-of-service attack (DDoS attack)
HOW DOS ATTACKS WORK - BEHIND THE SCENES