{"id":40,"date":"2014-09-26T15:21:00","date_gmt":"2014-09-26T15:21:00","guid":{"rendered":"http:\/\/www.asianux.org.vn\/index.php\/2014\/09\/26\/bypassing-firewalls-and-avoiding-detection\/"},"modified":"2014-09-26T15:21:00","modified_gmt":"2014-09-26T15:21:00","slug":"bypassing-firewalls-and-avoiding-detection","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2014\/09\/26\/bypassing-firewalls-and-avoiding-detection\/","title":{"rendered":"Bypassing Firewalls and Avoiding Detection"},"content":{"rendered":"<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\">The  type and scope of the penetration test will determine the need for being  stealthy during a penetration test. The reasons to avoid detection  while testing are varied; one of the benefits would include testing the  equipment that is supposedly protecting the network, another could be  that your client would like to know just how long it would take the  Information Technology team to respond to a targeted attack on the  environment.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\">Not only will you need to be wary of  the administrators and other observers on the target network, you will  also need to understand the automated methods of detection such as web  application, network, and host-based intrusion detection systems that  are in place to avoid triggering alerts.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\"><u><b>NOTE:-<\/b><\/u>When  presented with the most opportune target, take the time to validate  that it is not some sort of honeypot that has been set up to trigger  alerts when abnormal traffic or activity is detected! No<br \/>sense in  walking into a trap set by a clever administrator. Note that if you do  find a system like this it is still very important to ensure it is set  up properly and not inadvertently allowing access to critical<br \/>internal assets due to a configuration error!<\/span><\/div>\n<h3 style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\"><u><b>Lab preparation:-<\/b><\/u><\/span><\/h3>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\">BackTrack, pfSense, and Metasploitable virtual machines should be configured in the following manner:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/1.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/1.jpg\" height=\"592\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/div>\n<h3><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\"><u>Kali Linux guest machine:-<\/u><\/span><\/span><\/h3>\n<h3><\/h3>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\">This machine will need to be  connected to the 192.168.10.0\/24 subnet. In the Oracle VM VirtualBox  Manager console highlight the Kali Linux instance and select the <b>Settings<\/b> option from the top navigation bar. Ensure that only one network adapter is enabled. The adapter should use the <b>Vlan1<\/b> internal network option.<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/2.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/2.jpg\" height=\"403\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: inherit; font-size: small;\">Now power on your Kali machine and configure IP address manually as follow:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>#ifconfig eth0 <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.10.10<\/span><\/span><\/span><\/span> netmask <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>255.255.255.0<\/span><\/span><\/span><\/span>&nbsp;<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">As the pfSense machine will need to  be our router as well, we need to set it up as the default gateway. This  can be accomplished as follows:<br \/><b># route add default gw 192.168.10.1&nbsp;<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\"><u>Metasploitable<\/u><\/span><b><span style=\"font-weight: normal;\"><u> guest machine:-<\/u><\/span><\/b><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">The Metasploitable machine will be  used as the target. It needs to be configured to connect to VLAN2, which  is a new internal network we have not used before.To create an internal  network you will need to manually type VLAN2 into the network  configuration screen in the Oracle VM VirtualBox Manager. Your settings  should be similar to the following:<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/3.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/3.jpg\" height=\"403\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">pfSense network setup:-<\/span><\/u><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">Configuring  our firewall is a bit more work. It needs to be able to route  restrictive traffic from the VLAN1 network to the VLAN2 subnet. There  are several configuration changes we will need to make to ensure this  works properly.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Our firewall guest machine will use  two network adapters. One will be used for the VLAN1 segment and the  other for the VLAN2 segment. VLAN1 will be treated as an untrusted wide  area network for the examples within this chapter. Network Adapter 1  should resemble the following screenshot:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/4.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/4.jpg\" height=\"403\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Network Adapter 2 should be similar to the following:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/5.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/5.jpg\" height=\"403\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">Pfsense WAN IP configuration<\/span><\/u>:-<\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">The remaining networking setup will need to be performed from within the guest machine.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><b>1.<\/b> Boot up your pfSense virtual instance. There may be an additional delay  as pfSense attempts to configure the WAN adapter. Allow it to fully  load until you see the following menu:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/>\n<br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/Pfsense.png\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/Pfsense.png\" height=\"353\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><b>2. <\/b>The WAN and LAN interfaces will need to be configured properly.Select option 2) Set interface(s) IP address.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><b>3. <\/b>Select option 1 \u2013 WAN.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/6.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/6.jpg\" height=\"176\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><b>4.<\/b> When asked to configure the WAN interface via DHCP type n for no.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>5.<\/b> The IP for the WAN adapter should be <b>192.168.10.1.<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>6.<\/b> Subnet bit count should be set to 24. Type <b>24<\/b> and press Enter.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>7. <\/b>Next is set default gateway in our case <b>192.168.10.1.<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>8.<\/b>Next will ask about IPv6 in our type <b>n<\/b> and press enter.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>9.<\/b> Finally you got bellow screen:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/8.png\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/8.png\" height=\"353\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><b>10.<\/b> Press Enter again to return to the configuration menu.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Your LAN and WAN IP ranges should match the following:<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/9.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/9.jpg\" height=\"105\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\"><u>Pfsense LAN IP configuration<\/u><\/span>:-<\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">We  can set up the LAN IP information from the configuration menu as well.  One benefit of configuring the LAN here is that we can have a DHCP  server configured for VLAN2 at the same time.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><b>1. <\/b>Select option 2 from the configuration menu to start the LAN IP Configuration module.<br \/><b>2.<\/b> Choose the LAN interface (Option 2).<br \/><b>3.<\/b> When prompted to enter the IP address type 192.168.20.1.<br \/><b>4.<\/b> The bit count should be set to 24.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>5.<\/b> Next is set default gateway in our case <b>192.168.20.1.<\/b><b>&nbsp;<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>6.<\/b> When asked if you would like a DHCP server to be enabled on LAN choose y for yes.<br \/><b>7.<\/b> DHCP Client IP range start will be <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.10<\/span><\/span><\/span><\/span>.<br \/><b>8.<\/b> DHCP Client IP range stop will be <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.50<\/span><\/span><\/span><\/span>.&nbsp;<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/10.png\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/10.png\" height=\"354\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\"><b>&nbsp;9. <\/b>Press Enter again to return to the configuration menu.Your LAN and WAN IP ranges should match the following:<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/11.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/11.jpg\" height=\"99\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><span style=\"font-family: inherit;\"><span style=\"font-weight: normal;\"><u>&nbsp;Firewall configuration:-<\/u><\/span><\/span><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\">pfSense  can be configured using its intuitive web interface. Boot up the Kali  Linux machine with VLAN2, open a terminal and perform a sudo dhclient to  pick up an address from the pfSense DHCP server on VLAN2  (192.168.20.0\/24).<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\">In a web browser on the Ubuntu machine type <b>http:\/\/192.168.20.1\/<\/b> to access the configuration panel. If you have reset to factory  defaults you will need to step through the wizard to get to the standard  console. <\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\"><b>Note:-<\/b>The default username and password combination for pfSense is: <b>admin\/pfsense<\/b>.&nbsp;<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\">To view the current firewall rules choose <b>Firewall | Rules<\/b> and review the current configuration. By default the WAN interface  should be blocked from connecting internally as there are not  preestablished rules that allow any traffic through.&nbsp;<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/12.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/12.jpg\" height=\"206\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"> <\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">For testing purpose, we will enable ports 80, 443, 21, and allow ICMP. Add the rules as follows:<br \/><b>1.<\/b> Click on the add a new rule button displayed in the preceding screenshot.<br \/><b>2.<\/b> Use the following rule settings to enable ICMP pass-through:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: inherit; font-size: small;\">Action: Pass&nbsp;<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">Interface: WAN<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">Protocol: ICMP<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">All others: Defaults<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: inherit; font-size: small;\"><b>3.<\/b> Click on the Save button at the bottom of the screen.<br \/><b>4.<\/b> Click on the Apply Changes button at the top of the screen.<br \/><b>5.<\/b> Use the<b> Interface | WAN<\/b> navigation menu to enter the WAN interface configuration menu and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  uncheck Block private networks. Apply the changes and return to  Firewall | Rules.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/13.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/13.jpg\" height=\"81\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/>6. Click on the<b> add new rule<\/b> button.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>7. <\/b>Use the following rule settings to enable HTTP pass-through.<\/span><\/p>\n<ul>\n<li><span style=\"font-family: inherit; font-size: small;\">Action: Pass&nbsp;<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">Interface: WAN<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">Protocol: TCP<\/span><\/li>\n<li><span style=\"font-family: inherit; font-size: small;\">Destination port range: HTTP<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: inherit; font-size: small;\"><b>8. <\/b>Continue adding ports until the configuration matches the following:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/14.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/14.jpg\" height=\"286\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">At  this point any machine connected to VLAN1 can communicate through the  open ports as well as ping machines on the VLAN2 segment as can be seen  in the following screenshot<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/15.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/15.jpg\" height=\"206\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">Finding out if the firewall is blocking certain ports:-<\/span><\/u><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">There  is a firewall; now what? The next step is to determine which ports are  being blocked by the firewall, or more importantly which are open.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">Hping:-<\/span><\/u><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">&nbsp;Hping2 and Hping3 are included as part of the Kali Linux distribution. It can be accessed via the GUI navigation bar <b>Applications | Kali Linux | Information Gathering | Live Host Identify Live Hosts | Hping3<\/b>.  It can also be invoked at the command line by simply typing: hping2.  Hping2 is a powerful tool that can be used for various security testing  tasks. The following syntax can be used to find open ports while  remaining fully in control of your scan:<br \/><b># hping3 -S <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span> -c 80 -p ++1<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/16.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/16.jpg\" height=\"124\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\">&nbsp;This command allowed us to perform a SYN scan starting at port 1 and incrementing for 80 steps.<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Depending  on the firewall configuration it may also be possible to send spoofed  packets. During a test it is beneficial to ensure that the configuration  does not allow for this behavior to occur. Hping is perfectly suited  for this task. The following is an example of how you may test if the  firewall allows this traffic to pass:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>#hping3 -c 10 -S &#8211;spoof <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span> -p 80 192.168.20.100<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/>This command will spoof 10 packets from <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span> to port 80 on 192.168.20.100. This is the basis for an idle scan and if successful would allow you to hping the <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span> machine to look for an increase in the IP sequence number. In this case  we could enable monitoring on the pfSense machine to emulate what this  traffic looks like to a network administrator reviewing the logs.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Challenge  yourself to create and monitor different packets and uses of Hping so  that you can gain a good understanding of the traffic flow. The best  means of remaining undetected while testing is to fully understand the  technology that is being used. Take a look at the logs generated from a  successful scan and keep in mind that due to the amount of traffic  involved even secured networks will sometimes only log and trigger  events based on denied traffic.<\/span><b\nr \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/18.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/18.jpg\" height=\"268\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\"><u><b>&nbsp;Note:-<\/b><\/u>Logging  per rule will need to be enabled on the firewall to see allowed  traffic. Not logging permitted traffic is fairly standard practice as it  reduces the firewall log size. Educate your clients that proactively  monitoring allowed traffic can also be beneficial when attempting to  truly secure a network.<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><span style=\"font-weight: normal;\"><u>Nmap firewalk script:-<\/u><\/span><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">One  of the easiest methods to test open ports on a firewall is to simply  use the firewalking script for Nmap. To test the open firewall ports you  will need a host behind the firewall as the target:<br \/><b>#nmap &#8211;script=firewalk &#8211;traceroute <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span><\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">The  command sequence is straightforward and familiar: we invoke nmap, use  the script option, and choose the firewalk script. We then provide the  input that firewalk needs by performing a traceroute to <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.20.11<\/span><\/span><\/span><\/span> which we know is behind our target firewall.<b>&nbsp;<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/17.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/17.jpg\" height=\"446\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\"><b>&nbsp;<\/b>Although  we were able to determine which ports on the firewall were open (21,  80, and 443), if you take a look at the firewall denies it quickly  becomes apparent that this is not a quiet test and should only be used  when stealth is not needed. What this boils down to is that stealth  requires patience and a well made plan of action. It may be easier to  manually verify if there are any common ports open on the firewall and  then try to scan using one of the well-known ports.<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/19.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/19.jpg\" height=\"216\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">Avoiding IDS:-<\/span><\/u><\/span><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">In  a secured environment you can count on running into IDS and IPS.  Properly configured and used as part of a true defense in depth model  increases their effectiveness tremendously. This means that the IDS will  need to be properly updated, monitored, and used in the proper  locations. A penetration tester will be expected to verify that the  IDS&#8217;s are working properly in conjunction with all other security  controls to properly protect the environment.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">The  primary method of bypassing any IDS is to avoid signatures that are  created to look for specific patterns. These signatures must be  fine-tuned to find only positively malicious behavior and should not be  so restrictive that alerts are triggered for normal traffic patterns.  Over the years, the maturity level of these signatures has increased  significantly, but a penetration tester or knowledgeable attacker will  be able to use various means to bypass even the most carefully crafted  signatures. In this section, we review some of the methods that have  been used by attackers in the wild.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span>  <\/p>\n<h3><span style=\"font-family: inherit; font-size: small;\"><u><span style=\"font-weight: normal;\">Canonicalization Technique:-<\/span><span style=\"font-weight: normal;\"><br \/><\/span><\/u><\/span><\/h3>\n<h3><\/h3>\n<p><span style=\"font-family: inherit; font-size: small;\">Canonicalization  refers to the act of substituting various inputs for the canonical name  of a file or path. This practice can be as simple as substituting  hexadecimal representations ASCII text values. Here is an example of an  equivalent string:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/>\u2022 String A in Hex: &#8220;54:68:69:73:20:69:73:20:61:20:73:74:72:69:6e:67&#8221;<br \/>\u2022 String A in text: &#8220;This is a string&#8221;<br \/>\u2022 String A in ASCII: &#8220;084 104 105 115 032 105 115 032 097 032 115 116 114 105 110 103&#8221;&nbsp;<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">By  taking advantage of the fact there are sometimes literally thousands of  combinations possible for a single URL. To put this into perspective,  let&#8217;s take a look at the address we can use to get from our browser to  our local Apache server:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>#htpp:\/\/3232240651\/<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Luckily, this address confuses our Apache server and we receive the following message:<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/20.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/20.jpg\" height=\"260\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\">&nbsp;The  previous request attempted to load the local page at 127.0.0.1. Let&#8217;s  see what occurs when we try to load the remote pfSense administration  console in the same manner:<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><b>#http:\/\/<\/b><b><span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>2130706433<\/span><\/span><\/span><\/span>\/<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">Here we are warned by the web server hosti<br \/>\nng the pfSense administrative console that a potential DNS Rebind attack occurred:<b> <\/b><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/21.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/21.jpg\" height=\"234\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><span style=\"font-family: inherit;\"><b>&nbsp;<\/b>Let&#8217;s try something else that actually works properly:<\/span><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/>In the console, ping one of the addresses we listed above:<\/span><br \/><span style=\"font-family: inherit; font-size: small;\">&nbsp;<b>#ping 3232240651<\/b><\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: inherit; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/22.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/22.jpg\" height=\"220\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><span style=\"font-family: inherit; font-size: small;\">As we can see, the IP address  resolved properly and we receive our replies as expected. This very same  concept is key when trying to bypass an IDS rule. If the type of IDS  can be determined, then it should be possible to get the signatures.  When reviewing these signatures you would look for opportunities to  obscure the URLs, filenames, or other path information enough that it is  able to bypass the existing ruleset.<\/span><br \/><span style=\"font-family: inherit; font-size: small;\"><br \/><\/span><\/div>\n<p><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/www.copyrighted.com\/copyrights\/view\/pefp-9ci3-or05-elxg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" alt=\"Copyrighted.com Registered &amp; Protected  PEFP-9CI3-OR05-ELXG\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/seal.gif\" height=\"40\" title=\"Copyrighted.com Registered &amp; Protected  PEFP-9CI3-OR05-ELXG\" width=\"150\" \/><\/a>  <\/span><\/p>\n<div>\n<div><span style=\"font-size: small;\">Posted by <span itemprop=\"author\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"> <a data-gapiattached=\"true\" data-gapiscan=\"true\" data-onload=\"true\" href=\"https:\/\/plus.google.com\/104075626785737794056\" rel=\"author noopener\" title=\"author profile\" target=\"_blank\"><span itemprop=\"name\">Bhargav Tandel<\/span><\/a><\/span><\/span><span style=\"font-size: small;\"><span>at  <a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/bypassing-firewalls-and-avoiding.html\" rel=\"bookmark noopener\" title=\"permanent link\" target=\"_blank\"><abbr itemprop=\"datePublished\" title=\"2014-08-30T18:09:00+05:30\">6:09 PM<\/abbr><\/a><\/span><span><a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/bypassing-firewalls-and-avoiding.html#comment-form\" target=\"_blank\" rel=\"noopener\">No comments:     <\/a><\/span><\/span><span style=\"font-size: small;\"> <\/span><\/p>\n<div><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=523266434814576772&amp;target=email\" target=\"_blank\" title=\"Email This\" rel=\"noopener\"><span>Email This<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=523266434814576772&amp;target=blog\" target=\"_blank\" title=\"BlogThis!\" rel=\"noopener\"><span>BlogThis!<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=523266434814576772&amp;target=twitter\" target=\"_blank\" title=\"Share to Twitter\" rel=\"noopener\"><span>Share to Twitter<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=523266434814576772&amp;target=facebook\" target=\"_blank\" title=\"Share to Facebook\" rel=\"noopener\"><span>Share to Facebook<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=523266434814576772&amp;target=pinterest\" target=\"_blank\" title=\"Share to Pinterest\" rel=\"noopener\"><span>Share to Pinterest<\/span><\/a><\/span><\/div>\n<\/div>\n<div><span style=\"font-size: small;\"><\/span><\/div>\n<div><span style=\"font-size: small;\"><\/span><\/div>\n<\/div>\n<div><span style=\"font-size: small;\"><ins style=\"background-color: transparent; border: medium none; display: inline-table; height: 250px; margin: 0px; padding: 0px; position: relative; visibility: visible; width: 300px;\"><ins style=\"background-color: transparent; border: medium none; display: block; height: 250px; margin: 0px; padding: 0px; position: relative; visibility: visible; width: 300px;\"><\/ins><\/ins><\/span><\/div>\n<div>\n<h2><span style=\"font-size: small;\">August 26, 2014<\/span><\/h2>\n<div>\n<div>\n<div itemprop=\"blogPost\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/BlogPosting\"><span style=\"font-size: small;\"><a href=\"https:\/\/www.blogger.com\/null\" name=\"3278752562907603030\" target=\"_blank\" rel=\"noopener\"><\/a><\/span> <\/p>\n<h3 itemprop=\"name\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/hacking-operating-system-fingerprinting.html\" target=\"_blank\" rel=\"noopener\">Hacking &#8211; Operating System Fingerprinting using Different Tools &amp; Techniques<\/a><\/span><\/h3>\n<div itemprop=\"articleBody\">\n<h2 style=\"text-align: center;\"><span style=\"font-size: small;\"><u>Hacking &#8211; Operating System Fingerprinting using Different Tools &amp; Techniques <\/u><\/span><\/h2>\n<p><span style=\"font-size: small;\">After we know that the target machine is a live, we can then find out  the operating system used by the target machine. This method is commonly  known as Operating System (OS) fingerprinting.<\/span><br \/><span style=\"font-size: small;\">There are two methods of doing OS fingerprinting:<\/span><\/p>\n<ul>\n<li><span style=\"font-size: small;\"><b>active<\/b><b> <\/b><\/span><\/li>\n<li><span style=\"font-size: small;\"><b>passive<\/b><\/span><\/li>\n<\/ul>\n<p><span style=\"font-size: small;\">In the active method, the tool sends network packets to the target  machine and then determines the operating system of the target machine  based on the analysis done on the response it has received. The  advantage of this method is that the fingerprinting process is fast.  However, the disadvantage is that the target machine may notice our  attempt to get its operating system&#8217;s information. <\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To overcome the active method&#8217;s disadvantage, there exists a passive  method of OS fingerprinting. This method was pioneered by Michal  Zalewsky when he released a tool called p0f. The disadvantage of the  passive method is that the process will be slower than the active  method.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">In this section, we will describe a couple of tools that can be used for OS fingerprinting.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u>p0f<\/u>:-<\/span><\/h3>\n<p><span style=\"font-size: small;\">The p0f tool is used to fingerprint an  operating system passively. It can be used to identify an operating  system on the following machines:<\/span><br \/><span style=\"font-size: small;\"><br \/><b>\u2022<\/b> Machines that connect to your box (SYN mode; this is the default mode)<br \/><b>\u2022<\/b> Machines you connect to (SYN+ACK mode)<br \/><b>\u2022 <\/b>Machines you cannot connect to (RST+ mode)<br \/><b>\u2022 <\/b>Machines whose communications you can observe<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The p0f tool works by analyzing the TCP packets sent during the network  activities. Then, it gathers the statistics of special packets that are  not standardized by default by any corporations.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">An example is that the Linux kernel uses a 64-byte ping datagram,  whereas the Windows operating system uses a 32-byte ping datagram; or  the Time To Live (TTL ) value. For Windows, the TTL<br \/>\nvalue is 128, while  for Linux this TTL value varies between the Linux distributions. These  information are then used by p0f to determine the remote machine&#8217;s  operating system.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To use new version of p0f, just download the file from&nbsp;<span style=\"color: black;\"><a href=\"http:\/\/lcamtuf.coredump.cx\/p0f3\/releases\/p0f-3.07b.tgz\" target=\"_blank\" rel=\"noopener\">http:\/\/lcamtuf.coredump.cx\/p0f3\/releases\/p0f-3.07b.tgz<\/a><\/span><\/span><br \/><span style=\"font-size: small;\">Download and extract that file and relocate that folder Now Let&#8217;s use  p0f to identify the operating system used in a remote machine we are  connecting to. Just type the following command in your console:<\/span><br \/><span style=\"font-size: small;\"><b>#p0f -f p0f.fp -o log.log<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">This will read the fingerprint database from the \/root\/p0f-3.07b\/p0f.fp  file and save the log information to the log.log file. It will then  display the following information:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/110.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/110.jpg\" height=\"187\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Next, you need to generate network activities involving a TCP  connection, such as browsing to the remote machine or letting the remote  machine to connect to your machine.<\/span><br \/><span style=\"font-size: small;\">I use Netcat in another terminal for do that<\/span><br \/><span style=\"font-size: small;\"><b>#nc 192.168.198.131 80<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">If p0f has successfully fingerprinted the operating system, you will see  information of the remote machine&#8217;s operating system in the console and  in the log file.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/23.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/23.jpg\" height=\"356\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Based on the preceding result, we know that the target is a Linux 2.6.x machine.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following screenshot shows the information from the target machine:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/31.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/31.jpg\" height=\"68\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">By comparing this information, we know that p0f got the OS information  correctly. The remote machine is using Linux Version 2.6.You can stop  p0f by pressing the <b>Ctrl + C<\/b> key combination.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u><b><span style=\"font-weight: normal;\">Nmap<\/span><\/b><\/u>:-<\/span><\/h3>\n<p><span style=\"font-size: small;\">Nmap is a very popular and capable port  scanner. Besides this, it can also be used to fingerprint a remote  machine&#8217;s operating system. It is an active fingerprinting tool. To use  this feature, you can give the -O option to the nmap command.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">For example, if we want to fingerprint the operating system used on the 192.168.198.131 machine, we use the following command:<br \/><b>#nmap \u2013O 192.168.198.131<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/41.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/41.jpg\" height=\"135\" width=\"400\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Nmap was able to get the correct operating system information after fingerprinting the operating system of a remote machine.  <span style=\"color: black;\"><a href=\"http:\/\/www.copyrighted.com\/copyrights\/view\/pefp-9ci3-or05-elxg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" alt=\"Copyrighted.com Registered &amp; Protected  PEFP-9CI3-OR05-ELXG\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/seal.gif\" height=\"40\" title=\"Copyrighted.com Registered &amp; Protected  PEFP-9CI3-OR05-ELXG\" width=\"150\" \/><\/a><\/span><\/span> <\/div>\n<div>\n<div><span style=\"font-size: small;\">Posted by <span itemprop=\"author\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"> <a data-gapiattached=\"true\" data-gapiscan=\"true\" data-onload=\"true\" href=\"https:\/\/plus.google.com\/104075626785737794056\" rel=\"author noopener\" title=\"author profile\" target=\"_blank\"><span itemprop=\"name\">Bhargav Tandel<\/span><\/a><\/span><\/span><span style=\"font-size: small;\"><span>at  <a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/hacking-operating-system-fingerprinting.html\" rel=\"bookmark noopener\" title=\"permanent link\" target=\"_blank\"><abbr itemprop=\"datePublished\" title=\"2014-08-26T18:41:00+05:30\">6:41 PM<\/abbr><\/a><\/span><span><a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/hacking-operating-system-fingerprinting.html#comment-form\" target=\"_blank\" rel=\"noopener\">No comments:     <\/a><\/span><\/span><span style=\"font-size: small;\"> <\/span><\/p>\n<div><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=3278752562907603030&amp;target=email\" target=\"_blank\" title=\"Email This\" rel=\"noopener\"><span>Email This<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=3278752562907603030&amp;target=blog\" target=\"_blank\" title=\"BlogThis!\" rel=\"noopener\"><span>BlogThis!<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=3278752562907603030&amp;target=twitter\" target=\"_blank\" title=\"Share to Twitter\" rel=\"noopener\"><span>Share to Twitter<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=3278752562907603030&amp;target=facebook\" target=\"_blank\" title=\"Share to Facebook\" rel=\"noopener\"><span>Share to Facebook<\/span><\/a><a href=\"http:\/\/www.blogger.com\/share-post.g?blogID=7246803745536290988&amp;postID=3278752562907603030&amp;target=pinterest\" target=\"_blank\" title=\"Share to Pinterest\" rel=\"noopener\"><span>Share to Pinterest<\/span><\/a><\/span><\/div>\n<\/div>\n<div><span style=\"font-size: small;\"><\/span><\/div>\n<div><span style=\"font-size: small;\"><\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2><span style=\"font-size: small;\">August 19, 2014<\/span><\/h2>\n<p><span style=\"font-size: small;\"><a href=\"https:\/\/www.blogger.com\/null\" name=\"5791457529143094857\" target=\"_blank\" rel=\"noopener\"><\/a><\/span> <\/p>\n<h3 itemprop=\"name\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/kungfuhacking.blogspot.in\/2014\/08\/identifying-target-machine-using.html\" target=\"_blank\" rel=\"noopener\">Identifying the Target Machine using Different Tools &amp; Technique <\/a><\/span><\/h3>\n<h2 style=\"text-align: center;\"><span style=\"font-size: small;\"><u>Identifying the Target Machine using Different Tools &amp; Technique&nbsp;<\/u><\/span><\/h2>\n<p><span style=\"font-size: small;\">The tools included in this category are  used to identify the target machines that can be accessed by a  penetration tester. Before we start the identification process, we need<br \/>\n to know our client&#8217;s terms and agreements. If the agreements require us  to hide pen-testing activities, we need to conceal our penetration  testing activities. Stealth technique may also be applied for testing  the <b>Intrusion Detection System (IDS)<\/b> or <b>Intrusion Prevention System (IPS)<\/b> functionality. If there are no such requirements, we may not need to conceal our penetration testing activities.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u>ping:-<\/u><\/span><\/h3>\n<p><span style=\"font-size: small;\">&nbsp;The ping tool is the most famous tool  that is used to check whether a particular host is available. The ping  tool works by sending an <b>Internet Control Message Protocol (ICMP)<\/b> echo request packet to the target host. If the target host is available  and the firewall is not blocking the ICMP echo request packet, it will  reply with the ICMP echo reply packet.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><u><b>Note:-<\/b><\/u>The ICMP echo request and ICMP echo reply are two of the available ICMP control messages.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Although you can&#8217;t find ping in the Kali Linux menu, you can open the console and type the ping command with its options.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To use ping, you can just type ping and the destination address as shown in the following screenshot:<\/span><br \/><span style=\"font-size: small;\"><b>#Ping 192.168.126.130<\/b><\/span><br \/><span style=\"font-size: small;\"><b>&nbsp;<\/b> <\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/111.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/111.jpg\" height=\"392\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">In Kali Linux, by default, ping will run continuously until you press <b>Ctrl + C.<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The ping tool has a lot of options, but the following are a few options that are often used:<\/span><br \/><span style=\"font-size: small;\"><br \/><b>\u2022 The -c count:<\/b> This is the number of echo request packets to be sent.<br \/><b>\u2022 The -I interface address:<\/b> This is the network interface of the source address. The argument may&nbsp;<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; be a numeric IP address (such as 192.168.56.102) or the name of the&nbsp;&nbsp;<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device (such as eth0). This option is required if you want to ping the&nbsp;<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IPv6 link-local address.<br \/><b>\u2022 The -s packet size:<\/b> This specifies the number of data bytes to be sent. The default is 56 bytes,&nbsp;<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; which translates into 64 ICMP data bytes when combined with the 8 bytes of&nbsp;<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the ICMP header data.<\/span><br \/><span style=\"font-size: small;\"><b> <\/b><\/span><\/p>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">Let&#8217;s use the preceding information in practice.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><br \/>Suppose you are starting with  internal penetration testing work. The customer gave you access to their  network using a LAN cable. And, they also gave you the list of target  servers&#8217; IP addresses.<br \/>&nbsp;<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The first thing you would want to do  before launching a full penetration testing arsenal is to check whether  these servers are accessible from your machine. You can use ping for  this task.<br \/>&nbsp;<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The target server is located at  192.168.126.130, while your machine has an IP address of  192.168.126.129. To check the target server availability, you can give  the following command:<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><b>#ping -c 1 192.168.126.130<\/b><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The following screenshot is the result of the preceding ping command:<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><b> <\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/24.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/24.jpg\" height=\"134\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><u><b>Note:-<\/b><\/u>ping also accepts hostnames as the destination.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">From the preceding screenshot, we know that there is one ICMP echo  request packet sent to the destination (IP address: 192.168.126.130).  Also, the sending host (IP address: 192.168.126.129) received one ICMP  echo reply packet. The round-trip time required is 1.326 ms, and there  is no packet loss during the process.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">Let&#8217;s see the network packets that are transmitted and received by our  machine. We are going to use Wireshark, a network protocol analyzer, on  our machine to capture these packets, as shown in the following  screenshot:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/32.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/32.jpg\" height=\"42\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">From the preceding screenshot, we can see that our host  (192.168.126.130) sent one ICMP echo request packet to the destination  host (192.168.126.129). Since the destination is alive and allows the  ICMP echo request packet, it will send the ICMP echo reply packet back  to our machine.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">If your target is using an IPv6 address, such as <b>fe80::20c:29ff:fee1:96df<\/b>, you can use the ping6 tool to check its availability. You need to give the <b>-I <\/b>option for the command to work against the link-local address:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/42.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http\n:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/42.jpg\" height=\"124\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The following screenshot shows the packets sent to complete the ping6 request:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/51.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/51.jpg\" height=\"92\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">From the preceding screenshot, we know that ping6 is using the ICMPv6 request and reply.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><b><u>Security Tip:-<\/u><\/b>To block  the ping request, the firewall can be configured to only allow the ICMP  echo request packet from a specific host and drop the packets sent from  other hosts.<\/span><\/div>\n<h3 style=\"text-align: left;\"><span style=\"font-size: small;\"><u>arping:-<\/u><\/span><\/h3>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The arping tool is used to ping a host in the <b>Local Area Network (LAN)<\/b> using the <b>Address Resolution Protocol (ARP)<\/b> request. You can use arping to ping a target machine using its IP, host, or Media Access Control (MAC) address.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">The arping tool operates on Open System Interconnection (OSI) layer 2 (<b>network layer<\/b>), and it can only be used in a local network. Moreover, ARP cannot be routed across routers or gateways.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">To start arping, you can use the console to execute the following command:<\/span><br \/><span style=\"font-size: small;\"><b># arping<\/b><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">This will display brief usage information on arping.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">You can use arping to get the target host&#8217;s MAC address: <\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><b># arping 192.168.126.130 -c 1<\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/61.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/61.jpg\" height=\"96\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">From the previous command output, we can see that the target machine has a MAC address of <b>00:0c:29:e1:96:df<\/b>.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">Let&#8217;s observe the network packets captured by Wireshark on our machine during the arping process:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/7.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/7.jpg\" height=\"68\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">From the preceding screenshot, we can see that our network card (MAC  address: Vmware_e1:96:df) sends an ARP request to a broadcast MAC  address (Vmware_46:15:dc), looking for the IP address 192.168.126.130.  If the IP address 192.168.126.130 exists, it will send an ARP reply  mentioning its MAC address (Vmware_46:15:dc), as can be seen from packet  number 2.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">However, if the IP address is not available, there will be no ARP  replies, informing the MAC address of the 192.168.126.129 IP address, as  can be seen from the following screenshot: <\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/8.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/8.jpg\" height=\"68\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">Another common use of arping is to detect duplicate IP addresses in a  local network. For example, your machine is usually connected to a local  network using an IP address of 192.168.126.40; one day, you would like  to change the IP address. Before you can use the new IP address, you  need to check whether that particular IP address has already been used.<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">You can use the following arping command to help you detect whether the IP address of 192.168.126.140 has been used:<\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\"><b># arping -d -i eth0 192.168.126.140 -c 2<br \/># echo $?<\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/91.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/91.jpg\" height=\"122\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">If the code returns 0, it means that the IP address is  available.Whereas, if the code returns 1, it means that the IP address  of 192.168.126.140 has been used by more than one machine. <\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u>fping<\/u>:-<\/span><\/h3>\n<p><span style=\"font-size: small;\">The difference between <b>ping<\/b> and <b>fping<\/b> is that the fping tool can be used to send a ping (<b>ICMP echo<\/b>)  request to several hosts at once. You can specify several targets on  the command line, or you can use a file containing the hosts to be  pinged.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">In the default mode, fping works by monitoring the reply from the target  host. If the target host sends a reply, it will be noted and removed  from the target list. If the host doesn&#8217;t respond for a certain time  limit, it will be marked as unreachable.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">By default, fping will try to send three ICMP echo request packets to each target.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To access fping, you can use the console to execute the following command:<\/span><br \/><span style=\"font-size: small;\"><b># fping -h<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">This will display the description of usage and options available in fping.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following scenarios will give you an idea of the fping usage:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>If we want to know the alive hosts of 192.168.126.129, 192.168.126.130 and <span style=\"color: black;\"><span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.126.2<\/span><\/span><\/span><\/span> at once, we can use the following command:<br \/><b>#fping 192.168.126.129 192.168.126.130 192.168.126.2<\/b><\/p>\n<p>The following is the result of the preceding command:<\/p>\n<p><\/span><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/10.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/0\n9\/10.jpg\" height=\"86\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>We can also generate the host list automatically without  defining the IP addresses one by one and identifying the alive hosts.  Let&#8217;s suppose we want to know the alive hosts in the 192.168.56.0  network; we can use the -g option and define the network to check, using  the following command:<\/span><br \/><span style=\"font-size: small;\"><b># fping -g <span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.126.0<\/span><\/span><\/span><\/span>\/24<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The result for the preceding command is as follows:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/112.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/112.jpg\" height=\"398\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>If we want to change the number of ping attempts made to the  target, we can use the -r option (retry limit) as shown in the following  command line. By default, the number of ping attempts is three.<\/span><br \/><span style=\"font-size: small;\"><b>#fping -r 1 -g 192.168.126.130 192.168.126.2<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The result of the command is as follows:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/121.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/121.jpg\" height=\"368\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>Displaying the cumulative statistics can be done by giving the -s option (print cumulative statistics) as follows:<\/span><br \/><span style=\"font-size: small;\"><b>#fping -s www.yahoo.com www.google.com www.msn.com<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following is the result of the preceding command line:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/131.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/131.jpg\" height=\"372\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u>hping3<\/u>:-<\/span><\/h3>\n<p><span style=\"font-size: small;\">The <b>hping3<\/b> tool is a command-line  network packet generator and analyzer tool. The capability to create  custom network packets allows hping3 to be used for TCP\/IP and security  testing, such as port scanning, firewall rule testing, and network  performance testing.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 Test firewall rules<br \/>\u2022 Test Intrusion Detection System (IDS)<br \/>\u2022 Exploit known vulnerabilities in the TCP\/IP stack<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To access hping3, go to the console and type hping3. You can give  commands to hping3 in several ways, via the command line, interactive  shell, or script.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Without any given command-line options, hping3 will send a null TCP packet to port 0.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">In order to change to a different protocol, you can use the following options in the command line to define the protocol:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/141.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/141.jpg\" height=\"178\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\">When using the TCP protocol, we can use the TCP packet without any flags  (this is the default behavior) or we can give one of the following flag  options:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/151.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/151.jpg\" height=\"203\" width=\"320\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">&nbsp;Let&#8217;s use hping3 for several cases as follows:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>Send one ICMP echo request packet to a 192.168.126.130 machine.  The options used are -1 (for the ICMP protocol) and -c 1 (to set the  count to one packet):<\/span><br \/><span style=\"font-size: small;\"><b>#hping3 -1 192.168.126.130 -c 1<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following is the output of the command:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/161.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/161.jpg\" height=\"118\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">From the preceding output, we can note that the target machine is alive  because it has replied to our ICMP echo request. To verify this, we  captured the traffic using tcpdump and the following screenshot shows  the packets:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/171.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/171.jpg\" height=\"92\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\">We can see that the target has responded with an ICMP echo reply packet.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\"><b>\u2022 <\/b>Besides giving the options in the command line, you can also  use hping3 interactively. Open the console and type hping3. You will  then see a prompt where you can type your Tcl commands.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">For the preceding example, the following is the corresponding Tcl script:<\/span><br \/><span style=\"font-size: small;\">hping send {ip(daddr=192.168.56.101)+icmp(type=8,code=0)}<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">Open a command-line window and give the following command to get a response from the target server:<\/span><br \/><span style=\"font-size: small;\"><b>#hping recv eth0<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">After that, open another command-line window to input the sending request.<\/span><br \/><span style=\n\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following screenshot shows the response received:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/181.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/181.jpg\" height=\"86\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">\u2022 You can also use hping3 to check for a firewall rule. Let&#8217;s suppose you have the following firewall rules:<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u00b0 Accept any TCP packets directed to port 22 (SSH)<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u00b0 Accept any TCP packets related with an established connection<\/span><br \/><span style=\"font-size: small;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u00b0 Drop any other packets<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">To check these rules, you can give the following command in hping3 in order to send an ICMP echo request packet:<\/span><br \/><span style=\"font-size: small;\"><b>#hping3 -1 192.168.126.130 -c 1<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">The following code is the result:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/191.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/191.jpg\" height=\"116\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">We can see that the target machine has responded to our ping probe.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<h3><span style=\"font-size: small;\"><u>nping:-<\/u><\/span><\/h3>\n<p><span style=\"font-size: small;\">The nping  tool is a tool that allows users to generate network packets of a wide  range of protocols (TCP, UDP, ICMP, and ARP). You can also customize the  fields in the protocol headers, such as the source and destination port  for TCP and UDP. The difference between nping and other similar tools  such as ping is that nping supports multiple target hosts and port  specification.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">It can be used to send an ICMP echo  request just like in the ping command. nping can also be used for  network stress testing, Address Resolution Protocol (ARP) poisoning, and  the denial of service attacks.<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><span style=\"font-size: small;\">In Kali Linux, nping is included with the Nmap package.The following are several probe modes supported by nping:<\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/201.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/201.jpg\" height=\"167\" width=\"400\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<p><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">You need to open a console and type nping. This will display the usage and options&#8217; description.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">In order to use nping to send an ICMP echo request to the target  machines 192.168.198.129, 192.168.198.130, and 192.168.198.131, you can  give the following command:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#nping -c 1 192.168.198.129-131<\/b><\/span><br \/><span style=\"font-size: small;\">The following screenshot shows the command output: <\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/211.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/211.jpg\" height=\"350\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">From the preceding screenshot, we know that only the 192.168.198.131 machine is sending back the ICMP echo reply packet.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">If the machine is not responding to the ICMP echo request packet ,you  can still find out whether it is alive by sending a TCP SYN packet to an  open port in that machine.For example, to send one (-c 1) TCP packet  (&#8211;tcp) to the IP address 192.168.198.131 port 22 (-p 22), you can give  the following command:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#nping &#8211;tcp -c 1 -p 22 192.168.198.131<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Of course, you need to guess the ports which are open. We suggest that  you try with the common ports, such as 21, 22, 23, 25, 80, 443, 8080,  and 8443.<\/span><\/div>\n<p><span style=\"font-size: small;\">The following screenshot shows the result of the mentioned example:<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/221.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/221.jpg\" height=\"168\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">From the preceding result, we can see that the remote machine  (192.168.198.131) is alive because when we sent the TCP packet to port  22, the target machine responded.<\/span><\/div>\n<h3 style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><u>alive6<\/u>:-<\/span><\/h3>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">If you want to discover which machines are alive in an IPv6 environment,  you can&#8217;t just ask the tool to scan the whole network. This is because  the address space is very huge. You may find that the machines have a  64-bit network range. Trying to discover the machines sequentially in  this network will require at least 264 packets. Of course, this is not a  feasible task in the real world.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Fortunately, there is a protocol called ICMPv6 Neighbor Discovery. This  protocol allows an IPv6 host to discover the link-local and  autoconfigured addresses of all other IPv6 systems on the local network.  In short, you can use this protocol to find a live host on the local  network subnet.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">To help you do this, there is a tool called alive6, which can send an  ICMPv6 probe and is able to listen to the responses. This tool is part  of the THC-IPv6 Attack Toolkit developed by van Hauser from The Hackers  Choice group.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Suppose you want to find the active IPv6 systems on your local IPv6  network, the following command can be given with the assumption that the  eth0 interface is connected to the LAN:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#alive6 -p eth0<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/231.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/231.jpg\n\" height=\"121\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<h3 style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><u>detect-new-ip6<\/u>:-<\/span><\/h3>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">This tool can be used if you want to detect the new IPv6 address joining  a local network. This tool is part of the THC-IPv6 Attack Toolkit  developed by van Hauser from The Hackers Choice group.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">To access detect-new-ipv6, go to the console and type detect-new-ipv6. This will display the usage information. <\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Following is a simple usage of this tool; we want to find the new IPv6 address that joined the local network:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#detect-new-ip6 eth0<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/241.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/241.jpg\" height=\"105\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<h3 style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><u>passive_discovery6:-<\/u><\/span><\/h3>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">This tool can be used if you want to  sniff out the local network to look for the IPv6 address. This tool is  part of the THC-IPv6 Attack Toolkit developed by van Hauser from The  Hackers Choice group. Getting the IPv6 address without being detected by  an IDS can be useful.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><br \/>To access passive_discovery6, go to  the console and type passive_discovery6. This will display the usage  information on the screen.The following command is an example of running  this tool:<br \/><b>#passive_discovery6 eth0<\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/25.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/25.jpg\" height=\"91\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">This tool simply waits for the ARP request\/reply by monitoring the  network, and then it maps the answering hosts. The following are the  IPv6 addresses that can be discovered by this tool on the network:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>\u2022 fe80::539:3035:77a4:dc68<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b>\u2022 fe80::20c:29ff:fee1:96df<\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<h3 style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><u>nbtscan:-<\/u><\/b><\/span><\/h3>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">If you are doing an internal penetration  testing on a Windows environment, the first thing you want to do is get  the NetBIOS information. One of the tools that can be used to do this  is nbtscan.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">The nbtscan tool will produce a report that contains the IP address,  NetBIOS computer name, services available, logged in username, and MAC  address of the corresponding machines. The NetBIOS name is useful if you  want to access the service provided by the machine using the NetBIOS  protocol that is connected to an open share. Be careful as using this  tool will generate a lot of traffic and it may be logged by the target  machines.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">To access nbtscan, you can open the console and type nbtscan. As an  example, I want to find out the NetBIOS name of the computers located in  my network (<span style=\"color: black;\"><span dir=\"ltr\" tabindex=\"-1\"><span dir=\"ltr\"><span><img loading=\"lazy\" decoding=\"async\" class=\"skype_c2c_logo_img\" height=\"0\" src=\"resource:\/\/skype_ff_extension-at-jetpack\/skype_ff_extension\/data\/call_skype_logo.png\" width=\"0\" alt=\"\" title=\"\"><span>192.168.198.0<\/span><\/span><\/span><\/span>\/24). The following is the command to be used:<\/span><\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#nbtscan 192.168.198.1-254<\/b><\/span><\/p>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/26.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/26.jpg\" height=\"112\" width=\"640\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">From the preceding result, we are able to find three NetBIOS names, METASPLOITABLE.<b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Let&#8217;s find the service provided by these machines by giving the following command:<\/span><\/div>\n<p><span style=\"font-size: small;\"><b>#nbtscan -hv 192.168.198.1-254<\/b><\/span><br \/><span style=\"font-size: small;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">Option -h will print the service in a human-readable name. While, option -v will give more verbose output information.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><span style=\"color: black; font-size: small;\"><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/27.jpg\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/09\/27.jpg\" height=\"306\" width=\"400\" alt=\"\" title=\"\"><\/a><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><b><br \/><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\">From the preceding result, we can see that there are many services  available on METASPLOITABLE: Workstation,Messanger,File Server<b> <\/b>etc.  In our experience, this information is very useful because we know  which machine has a file sharing service. Next, we can continue to check  whether the file sharing services are open so that we can access the  files stored on those file sharing services.<\/span><\/div>\n<div style=\"clear: both; text-align: left;\"><span style=\"font-size: small;\"><i>URL: http:\/\/kungfuhacking.blogspot.in<\/i><b><br \/><\/b><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The type and scope of the penetration test will determine the need for being stealthy during a penetration test. The reasons to avoid detection while testing are varied; one of the benefits would include testing&hellip;<\/p>\n","protected":false},"author":1,"featured_media":112,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pentest","category-security"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}