<s>
Packet	B-Protocol
crafting	I-Protocol
is	O
a	O
technique	O
that	O
allows	O
network	O
administrators	O
to	O
probe	O
firewall	B-Application
rule-sets	O
and	O
find	O
entry	O
points	O
into	O
a	O
targeted	O
system	O
or	O
network	O
.	O
</s>
<s>
This	O
is	O
done	O
by	O
manually	O
generating	O
packets	B-Protocol
to	O
test	O
network	O
devices	O
and	O
behaviour	O
,	O
instead	O
of	O
using	O
existing	O
network	O
traffic	O
.	O
</s>
<s>
Testing	O
may	O
target	O
the	O
firewall	B-Application
,	O
IDS	O
,	O
TCP/IP	B-Protocol
stack	I-Protocol
,	O
router	B-Protocol
or	O
any	O
other	O
component	O
of	O
the	O
network	O
.	O
</s>
<s>
Packets	B-Protocol
are	O
usually	O
created	O
by	O
using	O
a	O
packet	B-Protocol
generator	I-Protocol
or	O
packet	B-Protocol
analyzer	I-Protocol
which	O
allows	O
for	O
specific	O
options	O
and	O
flags	O
to	O
be	O
set	O
on	O
the	O
created	O
packets	B-Protocol
.	O
</s>
<s>
The	O
act	O
of	O
packet	B-Protocol
crafting	I-Protocol
can	O
be	O
broken	O
into	O
four	O
stages	O
:	O
Packet	B-Protocol
Assembly	O
,	O
Packet	B-Protocol
Editing	O
,	O
Packet	B-Protocol
Play	O
and	O
Packet	B-Protocol
Decoding	O
.	O
</s>
<s>
Packet	B-Protocol
Assembly	O
is	O
the	O
creation	O
of	O
the	O
packets	B-Protocol
to	O
be	O
sent	O
.	O
</s>
<s>
Some	O
popular	O
programs	O
used	O
for	O
packet	B-Protocol
assembly	O
are	O
Hping	B-Protocol
,	O
Nemesis	O
,	O
,	O
,	O
,	O
,	O
,	O
Scapy	B-Protocol
,	O
and	O
Yersinia	O
.	O
</s>
<s>
Packets	B-Protocol
may	O
be	O
of	O
any	O
protocol	O
and	O
are	O
designed	O
to	O
test	O
specific	O
rules	O
or	O
situations	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
TCP	O
packet	B-Protocol
may	O
be	O
created	O
with	O
a	O
set	O
of	O
erroneous	O
flags	O
to	O
ensure	O
that	O
the	O
target	O
machine	O
sends	O
a	O
RESET	O
command	O
or	O
that	O
the	O
firewall	B-Application
blocks	O
any	O
response	O
.	O
</s>
<s>
Packet	B-Protocol
Editing	O
is	O
the	O
modification	O
of	O
created	O
or	O
captured	O
packets	B-Protocol
.	O
</s>
<s>
This	O
involves	O
modifying	O
packets	B-Protocol
in	O
manners	O
which	O
are	O
difficult	O
or	O
impossible	O
to	O
do	O
in	O
the	O
Packet	B-Protocol
Assembly	O
stage	O
,	O
such	O
as	O
modifying	O
the	O
payload	O
of	O
a	O
packet	B-Protocol
.	O
</s>
<s>
Programs	O
such	O
as	O
Scapy	B-Protocol
,	O
,	O
Netdude	O
allow	O
a	O
user	O
to	O
modify	O
recorded	O
packets	B-Protocol
 '	O
fields	O
,	O
checksums	O
and	O
payloads	O
quite	O
easily	O
.	O
</s>
<s>
These	O
modified	O
packets	B-Protocol
can	O
be	O
saved	O
in	O
packet	B-Protocol
streams	O
which	O
may	O
be	O
stored	O
in	O
pcap	B-Language
files	O
to	O
be	O
replayed	O
later	O
.	O
</s>
<s>
Packet	B-Protocol
Play	O
or	O
Packet	B-Protocol
Replay	O
is	O
the	O
act	O
of	O
sending	O
a	O
pre-generated	O
or	O
captured	O
series	O
of	O
packets	B-Protocol
.	O
</s>
<s>
Packets	B-Protocol
may	O
come	O
from	O
Packet	B-Protocol
Assembly	O
and	O
Editing	O
or	O
from	O
captured	O
network	O
attacks	O
.	O
</s>
<s>
Tcpreplay	O
is	O
the	O
most	O
common	O
program	O
for	O
this	O
task	O
since	O
it	O
is	O
capable	O
of	O
taking	O
a	O
stored	O
packet	B-Protocol
stream	O
in	O
the	O
pcap	B-Language
format	O
and	O
sending	O
those	O
packets	B-Protocol
at	O
the	O
original	O
rate	O
or	O
a	O
user-defined	O
rate	O
.	O
</s>
<s>
Scapy	B-Protocol
also	O
supports	O
send	O
functions	O
to	O
replay	O
any	O
saved	O
packets/pcap	O
.	O
</s>
<s>
added	O
support	O
for	O
pcap	B-Language
files	O
in	O
version	O
0.4	O
.	O
</s>
<s>
Some	O
packet	B-Protocol
analyzers	I-Protocol
are	O
also	O
capable	O
of	O
packet	B-Protocol
replay	O
.	O
</s>
<s>
Packet	B-Protocol
Decoding	O
is	O
the	O
capture	B-Protocol
and	O
analysis	O
of	O
the	O
network	O
traffic	O
generated	O
during	O
Packet	B-Protocol
Play	O
.	O
</s>
<s>
In	O
order	O
to	O
determine	O
the	O
targeted	O
network	O
's	O
response	O
to	O
the	O
scenario	O
created	O
by	O
Packet	B-Protocol
Play	O
,	O
the	O
response	O
must	O
be	O
captured	O
by	O
a	O
packet	B-Protocol
analyzer	I-Protocol
and	O
decoded	O
according	O
to	O
the	O
appropriate	O
specifications	O
.	O
</s>
<s>
Depending	O
on	O
the	O
packets	B-Protocol
sent	O
,	O
a	O
desired	O
response	O
may	O
be	O
no	O
packets	B-Protocol
were	O
returned	O
or	O
that	O
a	O
connection	O
was	O
successfully	O
established	O
,	O
among	O
others	O
.	O
</s>
<s>
The	O
most	O
famous	O
tools	O
for	O
that	O
task	O
are	O
Wireshark	B-Language
and	O
Scapy	B-Protocol
.	O
</s>
