Monday, March 31, 2014

How to Calculate IP Header Checksum (With an Example)

If you have ever tried to understand the TCP/IP protocols then you would have definitely stumbled upon the checksum field that is the part of protocol headers like TCP, IP etc.
Have you ever given a thought about things like what exactly is checksum, why is it used and how it is calculated. Well, in this article we will have a brief discussion on the concept of checksum and then we will go into details of how checksum is calculated.

What is Checksum?

A check sum is basically a value that is computed from data packet to check its integrity. Through integrity, we mean a check on whether the data received is error free or not. This is because while traveling on network a data packet can become corrupt and there has to be a way at the receiving end to know that data is corrupted or not. This is the reason the checksum field is added to the header. At the source side, the checksum is calculated and set in header as a field. At the destination side, the checksum is again calculated and crosschecked with the existing checksum value in header to see if the data packet is OK or not.

IP header checksum

IP header checksum is calculated over IP header only as the data that generally follows the IP header (like ICMP, TCP etc) have their own checksums. Now, to calculate the IP header algorithm one must know the basic header structure of IP protocol. So here is a basic format of how IP header looks like :
NOTE: To have a good understanding of the IP header fields, refer to: IP Protocol Header Fundamentals
So, as far as the algorithm goes, IP header checksum is : 16 bit one’s complement of the one’s complement sum of all 16 bit words in the header
This means that if we divide the IP header is 16 bit words and sum each of them up and then finally do a one’s compliment of the sum then the value generated out of this operation would be the checksum.
Now, the above is done at the source side which is sending the data packet. At the destination side which receives the data packet replaces the checksum value in the header with all zeros and then calculates the checksum based on the same algorithm as mentioned above. After a checksum value is obtained then this value is compared with the value that came in the header. This comparison decides whether the IP header is fine or corrupted.

IP Header Checksum Example

Since now we have enough theoretical knowledge on IP header checksum, lets take an IP header and actually try this algorithm out.
Here is a IP header from an IP packet received at destination :
4500 003c 1c46 4000 4006 b1e6 ac10 0a63 ac10 0a0c
Lets first map these values with the header
  • ’45′ corresponds to the first two fields in the header ie  ’4′ corresponds to the IP version and ’5′ corresponds to the header length. Since header length is described in 4 byte words so actual header length comes out to be 5×4=20 bytes.
  • ’00′ corresponds to TOS or the type of service. This value of TOS indicated normal operation.
  • ’003c’ corresponds to total length field of IP header. So in this case the total length of IP packet is 60.
  • ’1c46′ corresponds to the identification field.
  • ’4000′ can be divided into two bytes. These two bytes (divided into 3 bits and 13 bits respectively) correspond to the flags and fragment offset of IP header fields.
  • ’4006′ can be divided into ’40′ and ’06′. The first byte ’40′ corresponds to the TTL field and the byte ’06′ corresponds to the protocol field of the IP header. ’06′ indicates that the protocol is TCP.
  • ‘be16′ corresponds to the checksum which is set at the source end (which sent the packet). Please note that as already discussed this field will be set to zero while computing the checksum at destination end.
  • The next set of bytes ‘ac10′ and ’0a0c’ correspond to the source IP address and the destination IP address in the IP header.
So now we have a basic idea as to what these fields map to in IP header. Lets convert all these values in binary :
4500 -> 0100010100000000
003c -> 0000000000111100
4000 -> 0100000000000000
1c46 -> 0001110001000110 4006 -> 0100000000000110
is set to zero since we are computing checksum at destination end ac10 -> 1010110000010000 0a63 -> 0000101001100011
0000 -> 0000000000000000 // Note that the checksu m ac10 -> 1010110000010000
0a0c -> 0000101000001100
Now lets add these binary values one by one :
4500 -> 0100010100000000
003c -> 0000000000111100
/// First result 453C -> 010001010011110
453C -> 0100010100111100  0  // First result plus next 16-bit word. 1c46 -> 0001110001000110
// Second result plus next 16-bit word. 4
6182 -> 0110000110000010 // Second result. 6182 -> 011000011000001 0000 -> 0100000000000000 A182 -> 1010000110000010 // Third result.
-> 0100000000000110 E188 -> 1110000110001000 // Fourth result.
A182 -> 1010000110000010 // Third result plus next 16-bit word. 400 6 E188 -> 1110000110001000 // Fourth result plus next 16-bit word. AC10 -> 1010110000010000
to keep the checksum in 16 bits. 18D98 -> 11000110110011000 8D99 -> 1000110110011001 // Fifth result 8D99 -> 10001101100110
18D98 -> 11000110110011000 // One odd bit (carry),  add that odd bit to the result as we nee d01 // Fifth result plus next 16-bit word. 0A63 -> 0000101001100011 97FC -> 1001011111111100 // Sixth result 97FC -> 1001011111111100  // Sixth result plus next 16-bit word. AC10 -> 1010110000010000
s next 16-bit word 0A0C -> 0000101000001100 4E19 -> 0100111000011001 // Fi
1440C -> 10100010000001100 // Again a carry, so we add it (as done before) 1440C -> 10100010000001100 440D -> 0100010000001101 // This is seventh result 440D -> 0100010000001101 //Seventh result pl
unal result.
So now 0100111000011001 is our final result of summing up all the 16 bit words in the header. As a last step we just need to do a one’s compliment of it to obtain the checksum.
4E19 -> 0100111000011001
B1E6 ->1011000111100110 // CHECKSUM
Now if you compare this checksum with the one obtained in the packet you will find that both are exactly same and hence the IP header’s integrity was not lost.
So this is the way we calculate IP header checksum to check the integrity of IP header.

What is IP Multicasting

P multicast is a technique for one-to-many and many-to-many real-time communication over an IP infrastructure in a network. It scales to a larger receiver population by requiring neither prior knowledge of a receiver's identity nor prior knowledge of the number of receivers. Multicast uses network infrastructure efficiently by requiring the source to send a packet only once, even if it needs to be delivered to a large number of receivers. The nodes in the network (typically network switches and routers) take care of replicating the packet to reach multiple receivers such that messages are sent over each link of the network only once. The most common low-level protocol to use multicast addressing is User Datagram Protocol (UDP). By its nature, UDP is not reliable—messages may be lost or delivered out of order. Reliable multicast protocols such as Pragmatic General Multicast (PGM) have been developed to add loss detection and retransmission on top of IP multicast.
IP multi-casting is a communication mechanism in which data is communicated from server to a set of clients who are interested in receiving that data. Any client can dynamically enter or leave the communication.
IP multicast is a method of sending Internet Protocol (IP) datagrams to a group of interested receivers in a single transmission. It is often employed for streaming media applications on theInternet and private networks. The method is the IP-specific version of the general concept of multicast networking. It uses specially reserved multicast address blocks in IPv4 and IPv6. In IPv6, IP multicast addressing replaces broadcast addressing as implemented in IPv4.
Though the overall concept seems very simple but the way it is implemented requires  good understanding. So, in this tutorial we will cover the basics of IP multi-casting and how it is achieved.

Multicast IP address

To understand how multi-casting works, one needs to understand the structure of multicast IP address. Multicast IP address form the basis of multicast communication. In terms of classes, it’s the Class D IP addresses that are used as multicast IP addresses.
Here is the structure of Class D IP addresses :
So, it can be easily said that multicast IPs range from 224.0.0.0 to 239.255.255.255. As with the case of ports (where we have well known ports ie 0-1024), there are some reserved multicast IP addresses or well known IP addresses.
For example :
  • 224.0.0.1 signifies every system on a subnet
  • 224.0.0.2 signifies every router on a subnet
  • and so on
In case of multicast communication, the server sends data on a particular multicast IP address and clients who intend to receive that data need to listen on the same multicast address. These clients can be various different networks. A group of clients listening to same multicast address is known as host group.

On one hand, clients can leave and join a multicast group dynamically while on the other side the server does not need to know that identity of clients (joining or leaving). The clients useIGMP protocol for joining a multicast group.

Mapping multicast IP address with ethernet address

There is a specific mapping of IP multicast addresses with the ethernet mac addresses in order for multicast communication to work.
Before understanding the mapping, lets discuss multicast mac addresses :
  • An ethernet mac address is of 6 bytes or 48 bits.
  • A range of ethernet addresses ie from 00:00:5e:00:00:00 to 00:00:5e:ff:ff:ff is owned by IANA.
  • Now, a half of these addresses are reserved for multicast addresses but with one condition that the first byte of a multicast ethernet address should be 01.
  • This means that the ethernet addresses 01:00:5e:00:00:00 to 01:00:5e:7f:ff:ff are reserved as multicast ethernet addresses.
Now, here is how this mapping works :
  • The lower order 23 bits of a multicast mac address should correspond to IP multicast group ID (see figure above).
  • More precisely, this means that lower order 23 bits of multicast IP address should be same as lower order 23 bits of ethernet address.
This leads to another conclusion :
  • A multicast group ID is of 28 bits, but only lower 23 bits of a multicast group ID are mapped. This means that the higher order 5 bits of a multicast group ID can be variable.
  • This means that 32 (2 ^ 5) different IP multicast group IDs can map to one ethernet address.
  • Now, if a process on a system is interested in data packets destined for specific multicast group ID then the IP module or the device driver has to do perform some filtering operation as the interface card with a multicast ethernet address may receive packets of 32 different multicast group IDs.

Multicasting on single network

On a single network, the concept of multitasking works as follows :
  • The server sends data packet to specific destination IP address or a multicast IP address.
  • Through the mapping described above, the multicast IP address is converted into ethernet address and sent on the network.
  • A process on a client that is willing to receive multicast traffic need to specify the same multicast IP address while communicating with the systems IP layer which further configures lower layers to look out for such multicast packets.
  • When a multicast packet is received on the system, it is filtered in order to discard unwanted packets as 32 multicast group IDs can correspond to one ethernet address (explained above)
  • Please note that there can be multiple processes on single client that want to receive packets with same multicast ID. In this case, the kernel makes sure that each process gets a copy of the packet.

Multicasting across the networks

Things get a bit complex when multicast IP packets have to traverse across networks because of that fact that multiple routers come into the scenario. Each router that comes in path should support multi-casting and should contain forwarding entries for multicast packets. Whenever a client joins a multicast group, a distribution tree is created for it which specifies the path for the multicast traffic corresponding to this multicast connection. Talking about routers, it is helpful to get yourself comfortable with the route command examples.
Multiple routers can be part of a distribution tree and one router can be part of multiple distributions trees. It means that if a router is a part of X distribution trees then it must contain X number of forwarding entries where each entry would correspond to a distribution tree.

Multicasting Vs Broadcasting

Multicasting can be a good alternative to broadcasting in some scenarios like when a client needs a bootstrap server to boot-up. Generally it is done by sending broadcast packets but this results in packet processing by those hosts also that do not provide this service. While if the same is done through multicast messages then the requests would get received by only those hosts that provide this service.

Sunday, March 30, 2014

Wi-Fi Security

Wi-Fi Security – The Rise and Fall of WPS

Wireless local-area networks which are also referred to as WLANs or Wi-Fi are prevalent these days. They are so popular that they can be found installed in offices, colleges, hotels, cafes, and even homes. 
There are many Wi-Fi product vendors and service providers, providing different products with different services and features. The main reason behind them being so popular is the convenience, mobility and ease of implementation they provide compared to the wired network. The end user can easily access the network without the hassle of managing the wires.
Wireless networks are basically based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 set of standards for WLANs. Following is the list of the IEEE 802.11 network protocol standards.

Protocols

figure-1
802.11 network standards are shown in Figure 1.

Figure 1. 802.11 Network Standards (source: http://www.wikipedia.org)

Some years back, wireless networks were only a niche technology used for very specific applications. But nowadays they are everywhere and every now and then we find a new Wi-Fi access point through our smart phones, tablets or laptops – most of which are not even secure.
Most of us have used these access points at some point in time to access the Internet without realizing how much (In)security they provide.
An insecure Wi-Fi network poses a threat not only to the owner but to every user that accesses it. 

The first line of defense for a Wi-Fi network is encryption, which encrypts the data transmitted between the Wi-Fi enabled device (smart phone, tablet, laptop etc.) and the wireless router. The Wireless Protected Access (WPA) protocol and more recent WPA2 have replaced the older and less-secure practice of Wireless Encryption Protocol (WEP). 

It is better to go with WPA2 as WEP is relatively easy to crack. Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access 2 (WPA2) are two security protocols and security certification programs developed by the Wi-Fi Alliance to secure wireless computer networks by providing encryption mechanisms. But common users know little about wireless security and are scared by the available options to set up these methods.
Because of this unawareness and implementation issues with these protocols, in 2007 Wi-Fi Alliance came up with Wi-Fi Protected Setup (WPS) which allowed home users to easily add new devices to an already existing Wi-Fi network without entering long passphrases.
Wi-Fi Protected Setup (WPS), originally known as Wi-Fi Simple Config, is a computing standard that attempts to allow easy establishment of a secure wireless home network. Almost all major Wi-Fi product vendors (Cisco/Linksys, Netgear, D-Link, Belkin, Buffalo, Technicolor, etc.) have WPS-certified devices. WPS is activated by default on almost all the WPS supporting devices. The main purpose of the standard is on providing usability along with security.

Usage Methods

WPS provides four usage modes for adding a new device to an existing network, which are explained below. But first some terminology that will used in the explanation:
Terminology:
Enrollee: A new device that needs to be added to the network and does not have settings for the wireless network.
Registrar: One which provides wireless settings to the enrollee.
Access Point (AP): One which provides normal wireless network hosting and acts as middleware to pass messages between the enrollee and the registrar.
The four modes provided by WPS can be classified into two groups: In-band and Out-of-band.
This classification is made based upon the channel utilized for the information transfer.
In-Band modes:
Currently only these two modes are covered by WPS certification.
Push-Button-Connect (PBC):
The user merely has to push a button, either an actual or virtual one, on both the Access Point (or a registrar of the network) and the new wireless client device (enrollee). Support of this mode is mandatory for Access Points but optional for connecting devices. Figure 2 shows a Windows 7 machine as an enrollee. PBC on the AP will only be active until authentication has succeeded or timed-out after two minutes (or whatever amount of time the vendor has specified). This option is called wps_pbc in wpa_cli (text-based frontend) which interacts with wpa_supplicant; wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2.
figure-2
Figure 2. Activated virtual push button (Windows 7: Enrollee)

Source: http://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf

PIN Mode:
In this method a Personal Identification Number (PIN) has to be read from either a label or the display unit on the new wireless device. Figure 3 shows a WPS PIN on the label of a D-Link router. This PIN must then be inputted at the representant of the network (usually AP). Alternately, a PIN on the Access Point may be entered into the new device. This can also be explained on the basis of registrar, as following.
Internal Registrar
The user enters the PIN of the Wi-Fi adapter into the web interface of the AP. This option is called wps_pin in wpa_cli.
External Registrar
The user enters the PIN of the AP into a form on the client device (e.g. computer).
This option is called wps_reg in wpa_cli.
The PIN Method is a mandatory standard method; every Wi-Fi Protected Setup (WPS) certified product needs to support it.
figure-3
Figure 3.WPS PIN on D-Link router

Source: http://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf

Out-of-Band modes:
These two modes are not covered by WPS certification.
Near-Field-Communication (NFC) method:
In this method the user merely has to bring the new client adjacent to the Access Point to permit a near field communication among the two devices. The NFC method offers strong defense against adding an unintended device to the network. Support of this mode is optional and is not widely deployed.
USB method:
In this method the user uses a USB drive to transfer data between the new client device and the Access Point of the network. Support of this mode is optional, but denounced.

Protocol

Wi-Fi Protected Setup doesn’t enhance security features to devices. It simply makes the existing security features easy to enable and configure. One of the key elements of the WPS protocols is Extensible Authentication Protocol (EAP). EAP is an authentication framework often used in wireless networks and Point-to-Point connections. It provides for the transport and usage of keying material and parameters generated by EAP methods.
The WPS protocol consists as a sequence of EAP message exchanges that are initiated by a user action and relies on an exchange of descriptive information that should precede that user’s action. This descriptive information is transmitted through a new Information Element (i.e., an information component which when combined with other information provides the required information product) that is added to the beacon (periodically send management frame by AP), probe response and optionally to the probe request and association request/response messages.
IEs will hold the possible and the currently installed, configuration methods of the device other than purely informative type-length-values (TLV).
A human trigger is required to initiate the actual session of the protocol after the identification of the device’s capabilities on both the ends. The session consists of 8 messages followed by a message to indicate the protocol is completed (in case of a successful session). The exact stream of messages may change when configuring various kinds of devices (AP or STA).
Until very recently this protocol was used to provide the users with a feature of easy implementation of security on their Wi-Fi networks, but a recently discovered flaw has again put the wireless networks, and hence the users, at risk.

Security Issue

In December 2011 a freelance information security researcher Stefan Viehböck reported a design and implementation flaw in WPS that makes it vulnerable to a very basic hacking technique: brute-force attacks, feasible to perform against WPS-enabled Wireless networks. It can be simply understood as an attacker trying thousands of combinations in rapid sequence until he/she happens on the correct 8-digit PIN that allows authentication to the device. A successful attack on WPS allows unauthorized user to gain access to the network. The research paper of Viehböck can be found at http://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf. This vulnerability was also independently uncovered by Craig Heffner of Tactical Network Solutions, and involves how the router responds when incorrect PINs are inputted. When a PIN is entered, the router implementing WPS indicates whether the first or second halves of the PIN are correct or not.

The vulnerability revolves around the acknowledgement messages transmitted between the registrar and enrollee during the validation process of a PIN. The PIN, which is printed on the side label of each WPS-enabled Wi-Fi router, is an 8 digit number. As the last digit is a checksum of the previous digits,

there are seven unknown digits in each PIN, yielding a total of 107 = 10,000,000 possible combinations. The first and second halves of the PIN are separately validated and reported by the registrar when an enrollee tries to gain access through the PIN.


Now the maximum number of guesses required for PIN recovery is 11,000 (104=10,000 from the first half + 103=1,000 from the second half). This is a drastic reduction of the orders of degreea from the number of PINs that would have to be tested in the absence of the design flaw (i.e. 107=100,000,000). The result of this flaw is the presence of a practical attack which can be finished within hours. The difficulty of exploiting this flaw is that it is dependent on the implementation of WPS by the vendor, as Wi-Fi router manufacturers could guard against this attacks by slowing down or disabling the WPS feature after some failed PIN validation efforts.
Two tools have been developed as proof of concept to demonstrate that the attack is practical. Tactical Network Solutions, the Maryland based firm that released the first tool ‘Reaver’, states that they are aware of the vulnerability since early 2011. Tactical Network Solutions decided to release the tool after the vulnerability was made public. It is also selling a commercial version called ‘Reaver Pro’ with some more features. Reaver is hosted on Google Code at http://code.google.com/p/reaver-wps/. Its authors say that it can recover a router’s plain-text WPA or WPA2 password in 4 to 10 hours, depending on the access point.
The second tool is a PoC brute force tool implemented in Python and is a bit faster than Reaver, but supports less wireless adapters, as stated on the author’s website (http://sviehb.wordpress.com/). This tool can be found at http://dl.dropbox.com/u/22108808/wpscrack.zip.
Reaver
Reaver, developed by Tactical Network Solutions, runs on Linux. It aims the external registrar functionality mandated by the Wi-Fi Protected Setup requirement. It executes a brute force attack against an access point’s Wi-Fi Protected Setup (WPS) pin number. Once the WPS pin is found, an attacker can recover the WPA PSK and alternately reconfigure the AP’s wireless settings which could lead towards an insecure network. Although Reaver does not support reconfiguring the AP, this can be accomplished with wpa_supplicant once the WPS pin is recovered. Reaver requires the libpcap (packet capture and transmission) and libsqlite3 (database) libraries and can be built and installed by running the command:
1 $ ./configure

2 $ make
3 # make install

To remove everything installed/created by Reaver, the following command can be used:

1 # make distclean

Once installed the tool can simply be started using the command:

1 # ./reaver

The ‘–help’ argument can be used to show all the arguments available within the tool. Figure 4 shows the help list of the Reaver.
figure-4
Figure 4. Help list of Reaver
(Source: http://www.hack4fun.eu/2012/01/reaver-wps-wpscrack/)
The only requirement it has is a wireless card capable of raw packet injection. To start the process the wireless card must be put on monitor mode. This can be easily done using the airmon-ng tool from the wireless security testing aircrack-ng tool suite as shown below.

1 # airmon-ng start wlan0

The only essential arguments to Reaver are the interface name and the BSSID of the target AP, an example of which is shown below.

1 # reaver -i mon0 -b 00:01:02:03:04:05

Sometimes Reaver just tries the same pin over and over again. This might be because WPS is not enabled on the AP. Run the walsh tool (included in the Reaver-1.3 release) to scan for WPS-enabled APs and make sure the target AP is listed.
For extra information output, the verbose option may be provided using the argument ‘–v’. Providing the verbose option twice (-vv) will increase verbosity and display each pin number as it is attempted as shown in Figure 5.
figure-5
Figure 5. Reaver in action
(Source: http://www.hack4fun.eu/2012/01/reaver-wps-wpscrack/)
To speed up the attack the delay between pin attempts can be disabled by adding ‘–d 0? on the command line (default delay: 1 second).
1 # reaver -i mon0 -b 00:01:02:03:04:05 -vv -d 0
Another option that can speed up an attack is ‘–dh-small’. This option tells Reaver to use small Diffie-Hellman secret numbers in order to shrink the computational load on the target AP. In case the attacker does not want to reveal his/her MAC address, Reaver also supports MAC spoofing with the ‘–mac’ option, but it must be ensured that the MAC address of your wireless card’s physical interface (wlan0) must be changed – not the monitor mode interface (usually mon0) – otherwise the attack won’t work. Reaver keeps on brute forcing the PINs until a successful attempt. It has been stated that some models/vendors/ISPs come pre-configured with a default pin. Some common pins are 12345670, 00005678, 01230000, etc. Reaver attempts known default pins first as a better heuristic. Figure 6 shows a successfully cracked WPS PIN in 32,286 seconds.
figure-6
Figure 6. Successful Recovery
(Source:http://www.hack4fun.eu/2012/01/reaver-wps-wpscrack/)
Due to interference or low signal strength Reaver sometimes can’t associate with the AP. It might also be a driver issue.
Below is a list of wireless drivers tested by Reaver:
Supported:
The following wireless drivers have been tested or reported to work successfully with Reaver:
  • ath9k
  • rtl8187
  • carl19170
  • ipw2000
  • rt2800pci
  • rt73usb
Partially Supported:
The following wireless drivers have had mixed success, and may or may not work depending on your wireless card:
  • ath5k
  • iwlagn
  • rtl2800usb
  • b43
Not Supported:
The following wireless drivers/cards have been tested or reported to not work properly with Reaver:
    • iwl4965
    • RT3070L
    • Netgear WG111v3
Technically more than one instance of Reaver can be run against an AP, but this approach is flawed as it will only result in a double resource load on AP. Reaver advanced options (using ‘–a’ attribute) can be utilized to speed up the attack.

Mitigation
End users can disable WPS to prevent an attack, but because of the unawareness most people do not turn it off. Some access points don’t even provide an option to disable WPS.

Vendors can mitigate the flaw by introducing sufficiently long lock down periods (after unsuccessful attempts) to make the attack impractical to implement. This will require a new firmware release. Vendors also need to intensively test the protocols before implementing them on their devices, so that such flaws don’t come up in the future.

Conclusion

Today we are all surrounded by many Wi-Fi networks and have used them at some point in time without realizing the issues of the security. The issues discussed in this article are not the only issues related to wireless security, but a recent and major one affecting the privacy of the end users.
As we already know, almost all major router/AP vendors have WPS-certified devices and WPS–PIN (External Registrar) is mandatory for certification, which makes a lot of devices vulnerable to such an attack.
Having a sufficiently long lock-down period (vendor mitigation method) is most likely not a requirement for WPS certification for the device. However it should be a requirement in the new specifications. The vendors need to release new firmware to eliminate the issue. The main argument this issue presents before us is that such other flaws might be already present in other devices/protocols and misused by malicious intruders, hence the only safeguard we need to take is awareness among end users. Also the certifying authorities and the vendors need to thoroughly test the devices/protocols before implementation so that security features ultimately don’t lead towards insecurity.

Saturday, March 29, 2014

Understanding Standards for ethical hacking

The following standards (which we get friendly with in the upcoming sections) provide guidance on performing your test for ethical hacking

The OSSTMM is available from www.isecom.org/osstmm/

work ethically means what?




The term ethical in this context means working professionally and with good conscience. You must do nothing that is not in the approved plan or that has been authorized after the approval of the plan.

As an ethical hacker, you are bound to confidentiality and non-disclosure of information you uncover, and that includes the security-testing results. You cannot divulge anything to individuals who do not “need-to-know.” What you learn during your work is extremely sensitive — you must not openly share it.

Everything you do as an ethical hacker must be aboveboard, and must support the goals of the organization. You should notify the organization whenever you change the testing plan, change the source test venue, or detect high-risk conditions — and before you run any new high-risk or high-traffic tests, as well as when any testing problems occur.

You must also ensure you are compliant with your organization’s governance and local laws. Do not perform an ethical hack when your policy expressly forbids it — or when the law does.

Major attributes of an ethical hacker are patience and thoroughness. Doing this work requires hours bent over a keyboard in a darkened room. You may have to do some off-hours work to achieve your goals, but you don’t have to wear hacker gear and drink Red Bull. What you do have to do is keep plugging away until you reach your goal.