| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Search Irongeek.com:
Help Irongeek.com pay for bandwidth and research equipment: |
It supports also the following ICMP error types: Redirect, Source Quench,
Time Exceeded, Destination Unreachable and Parameter Problem.
It can do a little fingerprinting, see the FINGERPRINTING TECHNIQUES section
to read more details about.
It can emulate certain OOSS sending Echo Request or Echo Reply
packets. See the MIMIC TECHNIQUES section for a more accurate
information.
The host destination can also be specified as a list of gateways (including
destination) breaked by the % symbol meaning the use of a Strict Source Routing IP Option
(v.g. router1%router2%router3%host) or the @ symbol meaning the use of a Loose
Source Routing IP Option (v.g. router1@router2@router3@host).
A long number of examples is given at the EXAMPLES section of this page that shows a real
use of this program.
host-unreach (Host Unreachable) The destination host is unreachable.
prot-unreach (Protocol Unreachable) desired protocol is unreachable to destination host.
port-unreach (Port Unreachable) desired port is unreachable to destination host.
frag-needed (Fragmentation Needed and Dont Fragment was Set) Shows that IP packet had
to be fragmented because of its size but the sender did not allowed it because
the DF (DONT FRAGMENT) flag was set.
sroute-fail (Source Route Failed) couldnt follow the route indicated on IP packet.
net-unknown (Destination Network Unknown) Destination network is unknown.
host-unknown (Destination Host Unknown) Destination host unknown but network is.
host-isolated (Source Host Isolated) Cant reach destination host.
net-ano (Communication with Destination Network is Administratively
Prohibited) access network is denied through firewall or similar on receiver side.
host-ano (Communication with Destination Host is Administratively
Prohibited) access host is denied through firewall or similar on receiver side.
net-unr-tos (Destination Network Unreachable for Type of Service)
indicates on destination network that the Type Of Service (TOS) applied for is not allowed.
host-unr-tos (Destination Host Unreachable for Type of Service) shows that destination
host is unreachable with applied TOS.
com-admin-prohib (Communication Administratively Prohibited) a router cant forward a
packet because of administrative filter.
host-precedence-viol (Host Precedence Violation) IP packet precedence is not allowed.
precedence-cutoff (Precedence cutoff in effect) a smaller IP packet precedence has tried to
be sent over the minimal impossed by network manager.
host (Redirect Datagram for the Host) shows that destination is a host.
serv-net (Redirect Datagram for the Type Of Service and Network) destination is a type of service
and network.
serv-host (Redirect Datagram for the Type Of Service and Host) destination is a type of service
and host.
frag (Fragment Reassembly Time Exceeded) could not reassembly all the IP packet fragments.
With Solaris systems SING use a method discovered by me: Sending a
fragmented Addres Mask Request any Solaris system (tested from 2.5.1 to
Solaris8 Intel & SPARC) respond with an Address Mask of 0s.
Last update!: Some people have noticed that HP-UX v11.0 respond the same
way.
See the EXAMPLES section for examples.
Value Meaning
----- -----------
0 Received at least 1 response from destination host.
1 General Error.
2 Packet sent OK but received no response.
3 Out of memory.
sing -mask -O www.solarisbox.xx
- Testing if www.winbox.xx is running the Window$ OS:
sing -O www.winbox.xx
- Send Echos with garbage size of 32 bytes and fragments of 8 bytes to host
www.provatina.xx:
sing -s 32 -F 8 www.provatina.xx
- Send Echos with data pattern IsSiNg and fragments of 8 bytes to the
host www.provatina.xx using Loose Source Routing via router1.xx and
router2.xx:
sing -p IsSiNg -F 8 router1.xx@router2.xx@www.provatina.xx
- Send an ICMP packet Timestamp to host sepultura.hell. We spoof as host
10.2.3.1:
sing -tstamp -S 10.2.3.1 sepultura.hell
- Send an ICMP packet Router Solicitation to 10.13.1.0:
sing -rts 10.13.1.0
- Send an ICMP Router Advertisement to host death.es, saying that the routers
to use are: router1.xtc with preference 20, router2.xtc with preference 50
and router3.xtc with default preference (0). We spoof as fatherouter.xtc:
sing -rta router1.xtc/20 -rta router2.xtc/50
-rta router3.xtc -S fatherouter.xtc death.es
- In response to a packet send with TCP source port 100 and destination on port 90,
we want to send and ICMP Redirect to dwdwah.xx to modify its routing table with the following
data: 10.12.12.12 as a gateway to the host death.es masking the packet source
as if it was sent from infect.comx host:
- In response to an ICMP packet Echo Request sent with Echo Request id 100 and
Echo Request sequence number 90, we want to send an ICMP Redirect to the host
araya.xx to modify its routing table with the following data: the host
pizza.death as a gateway to the host death.es, masking the packet source as if
it was sent from infect.comx host.
sing -red -S infect.comx -gw pizza.death
-dest death.es -x host -prot icmp
-ip_id 100 -ip_seq 90 araya.xx
- We want to send an ICMP packet Destination Unreach to the host 10.2.3.4
saying that our TCP port number 20 connected with its TCP port 2100, is unreachable.
We mask ourselves as host 10.1.1.1:
sing -du -S 10.1.1.1 -x port-unreach -prot
tcp -psrc 2100 -pdst 20 10.2.3.4
- We want to send an ICMP packet Destination Unreach to host 10.2.3.4
saying that the host inferno.hell and its TCP port 69, connected with his
port TCP 666 in unreachable. We mask ourselves as gateway router.comx:
sing -du -S router.comx -x host-unreach
-prot tcp -psrc 666 -pdst 69 -orig inferno.hell
10.2.3.4
- We want to send a packet ICMP Source Quench to host ldg02.hell in
response to a packet destinated to host ldg00 with UDP protocol, source
port 100 and destination port 200. We mask ourselves as gateway 10.10.10.1:
sing -sq -S 10.10.10.1 -prot udp -psrc
100 -pdst 200 -orig ldg00 ldg02.hell
- We want to send an ICMP packet Time Exceeded to host ldg02.hell in
response to a packet destinated to host ldg00 with UDP protocol, source
port 100 and destination port 200. We mask as gateway ldg04.hell:
sing -tx -S ldg04.hell -x frag -prot
udp -psrc 100 -pdst 200 -orig ldg00 ldg02.hell
- We want to send an ICMP packet Address Mask Request and wait 10 seconds
between sending each packet. We mask the packet with source address of
10.2.3.4 and we send it to the address 10.0.1.255:
sing -mask -S 10.2.3.4 -T 10 10.0.1.255
- We want to send an ICMP packet Information Request to host deep.hell:
sing -info deep.hell
- We want to send an ICMP packet Echo Request to host black.hell with the data
pattern MyNameIsGump:
sing -p MyNameIsGump black.hell
- We want to send ICMP packet Echo Request to 10.12.0.255 with the following data pattern:
D E A T H (blanks included). We will mask the source address as 192.168.0.255:
sing -S 192.168.0.255 -p D E A T H 10.12.0.255
- We want to send an ICMP packet Destination Unreach to host destination.death but sending it
with an ICMP code bigger to the legal ones adding also 60K of garbage data:
sing -du -x max -s 60000 destination.death
- We send an ICMP Parameter Problem to host misery.es saying that the packet sent
from the host dump.xorg with udp protocol, source port 13 and destination port 53,
has an error on the IP header byte 13. We will also add all garbage bytes as possible:
sing -S dump.xorg -param -ptr 13 -prot
udp -psrc 13 -pdest 53 -s max misery.es
- We want to send an ICMP packet Timestamp to host www.danz.hell with code 38
instead of code (0) as usual:
sing -tstamp -x 38 www.danz.hell
- Same as above without code 38 and using Loose Source Routing between the routers
cisco, 10.13.1.1 and wakeup.man:
sing -tstamp cisco@10.13.1.1@wakeup.man@www.danz.hell
- Same as above using Strict Source Routing between the gateways:
sing -tstamp cisco%10.13.1.1%wakeup.man%www.danz.hell
- Using Record Route IP Option to see the route that takes to ftp.target.xx:
sing -R ftp.target.xx
Mogul, Jeffrey and John Postel, "Internet Standard Subnetting Procedure",
RFC 950, Stanford, USC/Information Sciences Institute, August 1985.
Braden, Robert, "Requeriments for Internet Hosts - Communication Layers",
RFC 1122, USC/Information Sciences Institute, October 1989.
Deering, Stephen, "ICMP Router Discovery Messages", RFC 1256, Xerox
PARC, September 1991.
Baker, Fred, "Requeriments for IP Version 4 Routers", RFC 1812, Cisco
Systems, June 1995.
Arkin, Ofir, "ICMP usage in scanning",
http://www.sys-security.com/archive/papers/ICMP_Scanning.pdf,
Sys-Security Group, July 2000.
The Linux source code, everything referent to network code and to ICMP protocol.
sing is original from Alfredo Andres Omella, Slay <aandres@s21sec.com>
15 most recent posts on Irongeek.com:
|
If you would like to republish one of the articles from this site on your
webpage or print journal please contact IronGeek.
Copyright 2020, IronGeek
Louisville / Kentuckiana Information Security Enthusiast