Notes from hacking tutorial

Before making an attempt to penetrate any site, all intruders gain as much information on the target without directly probing the target. This could involve one of the many ways listed below

whois database (Domain and IP )
Telephone directory
Government Records
Search Engines
Company’s website
Company’s support line/help desk
Business cards
Social Engineering

This is the first stage of active penetration, which requires the attacker to send suspicious packets to the target network. There are few things which the attacker needs to keep in mind while attempting this scan.

List possible entry points
Keep a low profile. Use stealth mode as much as possible.
Go as slow as possible
Do not repeat tests
Prepare to change tools quickly depending on output from the current tools.
Decoy is your friend
So are bounce scans
War dialing is an act of gaining access to modems by repeatedly dialing a block of phone numbers looking for a modem handshake. If the attacker has sufficient information on the block of phone numbers assigned to a target, he/she can get a lot of information based on this scan which includes
Generate list of modems
Generate list of unsecure modems
Generate list of misconfigured devices
Generate list of fax numbers
Deciding on the right tool
How many numbers do I need to dial?
How often will I be performing the war dial assessment?
What is the false positive rate?
Is the software user friendly?
Does the software contain documentation?
What type of reporting am I looking for?
What extension(s) can I use to export my findings?
Can I trust the download site or does the software contain malicious code?
Is technical support offered?
What is the time frame offered to finish the assessment?
Does the application have a scheduling feature?
Does the application allow for differential reporting?
Tools used
THC-Scan (freeware)
Toneloc (freeware)
SecureLogix Telesweep Secure (commercial)
Sandstorm PhoneSweep (commercial)


War driving is an act of gaining access to network by listening to mis-configured or unsecured wireless Access Points.
Generate list of APs
Generate list of unsecured APs
Generate list of misconfigured AP
More info
Attacks possible
No Encryption – Anyone can join
MITM attack possible
DOS leading to MITM. After Disassociating, the client might re-attach to attackers AP.
Sending a “Disassociate” forces the client to send SSID in cleartext
MAC address can easily be sniffed. MAC based authentication is no good
MAC poisoning is also another problem
Static WEP encryption can be hacked easily using statistical analysis. It can be speeded up by replay-packet attacks which creates network activity.
DOS/Jamming attacks.
Wireless Bands
802.11a – Direct Sequence Spread Spectrum
2.4GHz – 2.4835GHz
14 Channels, 1-11 used in US
1000mW max power, Most use between 10-100mW
CMSA/CA - (Carrier Sense Multiple Access/Collision Avoidance)
Exponential Backoff and retry
Collision avoidance via physical carier sence and Network allocation vector.
Types of management packets
Probe requests and response
Associate request and response
RTS – request for tramist
CTS – clear to transmit
ACK – transmit ok
Packet format – (Ref:
MAC Packet Format

Tools used
Wellenreiter -;=Downloads&d;_op=viewdownload&cid;=13
Prism-decode (
§ 802.11 protocol decoder for prismdump output. Either specify prismdump capture file or pipe prismdump
THC-wardrive (freeware)
Airsnort - (linux/bsd)
Ethereal -
Aerosol -
Istumbler (imac) -
Apsniff -
KisMAC -
KisMet -
PocketWarrior -
Prism2 Dump -
Tcpdump -
Wavemon -
Wistumbler -
Airscope -
Mognet -
The encryption apparently is a form of XOR
The WEP key is 40 or 104 bit long. This is a shared key.
In RC4 each key has an associated encryption and decryption stream.
The size of each encrypted text is variable. Hence
The Packet is encrypted using RC4 and the key is a combination of the WEP key and a psuedo session IV (initialization vector) which acts as a seed. The IV is 3 bytes long which is unique for each client and the WEP key shared secret is 104 bytes.
Now if we can sniff the 802.11 header and get the cryptic text then logically if you know the date which is encypted you can figure out the key

How to secure yourself against this attack
Secure the last mile

Hacking with a Pringles Tube:
Hacking Techniques:,lnxw41=WarDialing;=WirelessSniffers
Layer 2 Protocol Specification:

Network Scanning is currently the most watched intrusion space which is both easy to scan and easy to set off alarms if the intruder is not carefull.

Tools used
Arpscan –
arpscan is a very simple scanner which sends out arp requests for the given IP addresses and displays a list of the found hosts.
Firewalk -
Firewalk is an active reconnaissance network security tool that attempts to determine what layer 4 protocols a given IP forwarding device will pass. Firewalk works by sending out TCP or UDP packets with a TTL one greater than the targeted gateway. If the gateway allows the traffic, it will forward the packets to the next hop where they will expire and elicit an ICMP_TIME_EXCEEDED message. If the gateway hostdoes not allow the traffic, it will likely drop the packets on the floor and we will see no response.
Fragroute -
fragroute intercepts, modifies, and rewrites egress traffic destined for a specified host, implementing most of the attacks described in the Secure Networks "Insertion, Evasion, and Denial of Service: Eluding Network Intrusion Detection" paper of January 1998. It features a simple ruleset language to delay, duplicate, drop, fragment, overlap, print, reorder, segment, source-route, or otherwise monkey with all outbound packets destined for a target host, with minimal support for randomized or probabilistic behaviour.
Libdnet -
libdnet provides a simplified, portable interface to several low-level networking routines
Libnet -
Libnet is a high-level API (toolkit) allowing the application programmer to construct and inject network packets. It provides a portable and simplified interface for low-level network packet shaping, handling and injection. Libnet hides much of the tedium of packet creation from the application programmer such as multiplexing, buffer management, arcane packet header information, byte-ordering, OS-dependent issues, and much more. Libnet features portable packet creation interfaces at the IP layer and link layer, as well as a host of supplementary and complementary functionality. Using libnet, quick and simple packet assembly applications can be whipped up with little effort

lsrscan -
lsrscan checks the behaviour of remote hosts to loose source routed packets.
Lsrtunnel -
lsrtunnel spoofs connections using source routed packets.
By measuring the behavior of various operating systems' TCP retransmission timeout lengths (or RTOs), it is possible to distinguish between OSes on a network. Franck Veysset, Olivier Courtay, and Olivier Heen of the Intranode Research Team first published this concept in April, 2002, and their paper goes into appreciable detail in its discussion of this technique, the mechanisms by which TCP retransmission timers are computed, and OS fingerprinting in general.
Maps network design
Nmap another swiss army knife
Active OS fingerprinting tool
P0f -
The passive OS fingerprinting technique is based on information coming from a remote host when it tries to establish a connection to your system. Captured packet parameters contain enough information to identify the remote OS. In contrast to active scanners such as nmap and queso, p0f does this without sending anything to the remote host.
Great fingerprinting tool
Other Ideas
FTP Bounce scans -
Bounces tcp connect scans using open ftp proxy servers
Launching attacks with popular source port
IP Personalities -
The Linux IP Personality patch adds to your Linux 2.4 kernel the ability to have different 'personalities' network wise, that is to change some characteristics of its network traffic, depending on different parameters
Defeating firewalking
IP Scrubbing, is central part of any new firewall. It cleans up the packets and repackages it which scrubs off critical information which could be leaked to the attacker.
Using Application Proxies
IDS Evasion
IDS evasion is important for penetration testing without generating alarm. Look at fragroute and fragrouter for possible tools which can be used to evade.


Popular posts from this blog

Chrome Frame - How to add command line parameters

Creating your first chrome app on a Chromebook

Brewers CAP Theorem on distributed systems