<s>
ngrep	B-Protocol
(	O
network	B-Architecture
grep	B-Application
)	O
is	O
a	O
network	B-Architecture
packet	B-Protocol
analyzer	I-Protocol
written	O
by	O
Jordan	O
Ritter	O
.	O
</s>
<s>
It	O
has	O
a	O
command-line	B-Application
interface	I-Application
,	O
and	O
relies	O
upon	O
the	O
pcap	B-Language
library	O
and	O
the	O
GNU	B-Operating_System
regex	B-Language
library	O
.	O
</s>
<s>
ngrep	B-Protocol
supports	O
Berkeley	B-Protocol
Packet	I-Protocol
Filter	I-Protocol
(	O
BPF	B-Protocol
)	O
logic	O
to	O
select	O
network	B-Architecture
sources	O
or	O
destinations	O
or	O
protocols	O
,	O
and	O
also	O
allows	O
matching	O
patterns	O
or	O
regular	B-Language
expressions	I-Language
in	O
the	O
data	O
payload	O
of	O
packets	O
using	O
GNU	B-Operating_System
grep	B-Application
syntax	O
,	O
showing	O
packet	O
data	O
in	O
a	O
human-friendly	O
way	O
.	O
</s>
<s>
ngrep	B-Protocol
is	O
an	O
open	O
source	O
application	O
,	O
and	O
the	O
source	O
code	O
is	O
available	O
to	O
download	O
from	O
the	O
ngrep	B-Protocol
site	O
on	O
GitHub	B-Application
.	O
</s>
<s>
It	O
can	O
be	O
compiled	O
and	O
ported	O
to	O
multiple	O
platforms	O
,	O
it	O
works	O
in	O
many	O
UNIX-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
:	O
Linux	B-Application
,	O
Solaris	B-Application
,	O
illumos	B-Application
,	O
BSD	B-Operating_System
,	O
AIX	B-Application
,	O
and	O
also	O
works	O
on	O
Microsoft	B-Application
Windows	I-Application
.	O
</s>
<s>
ngrep	B-Protocol
is	O
similar	O
to	O
tcpdump	B-Protocol
,	O
but	O
it	O
has	O
the	O
ability	O
to	O
look	O
for	O
a	O
regular	B-Language
expression	I-Language
in	O
the	O
payload	O
of	O
the	O
packet	O
,	O
and	O
show	O
the	O
matching	O
packets	O
on	O
a	O
screen	O
or	O
console	O
.	O
</s>
<s>
It	O
allows	O
users	O
to	O
see	O
all	O
unencrypted	O
traffic	O
being	O
passed	O
over	O
the	O
network	B-Architecture
,	O
by	O
putting	O
the	O
network	B-Architecture
interface	O
into	O
promiscuous	B-Protocol
mode	I-Protocol
.	O
</s>
<s>
ngrep	B-Protocol
with	O
an	O
appropriate	O
BPF	B-Protocol
filter	O
syntax	O
,	O
can	O
be	O
used	O
to	O
debug	O
plain	O
text	O
protocols	O
interactions	O
like	O
HTTP	B-Protocol
,	O
SMTP	B-Protocol
,	O
FTP	B-Protocol
,	O
DNS	B-Protocol
,	O
among	O
others	O
,	O
or	O
to	O
search	O
for	O
a	O
specific	O
string	O
or	O
pattern	O
,	O
using	O
a	O
regular	B-Language
expression	I-Language
syntax	O
.	O
</s>
<s>
ngrep	B-Protocol
also	O
can	O
be	O
used	O
to	O
capture	O
traffic	O
on	O
the	O
wire	O
and	O
store	O
pcap	B-Language
dump	O
files	O
,	O
or	O
to	O
read	O
files	O
generated	O
by	O
other	O
sniffer	O
applications	O
,	O
like	O
tcpdump	B-Protocol
,	O
or	O
wireshark	B-Language
.	O
</s>
<s>
ngrep	B-Protocol
has	O
various	O
options	O
or	O
command	B-Application
line	I-Application
arguments	O
.	O
</s>
<s>
The	O
ngrep	B-Protocol
man	B-Protocol
page	I-Protocol
in	O
UNIX-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
show	O
a	O
list	O
of	O
available	O
options	O
.	O
</s>
<s>
In	O
these	O
examples	O
,	O
it	O
is	O
assumed	O
that	O
eth0	O
is	O
the	O
used	O
network	B-Architecture
interface	O
.	O
</s>
<s>
Capturing	O
raw	O
network	B-Architecture
traffic	O
from	O
an	O
interface	O
requires	O
special	O
privileges	O
or	O
superuser	B-Application
privileges	O
on	O
some	O
platforms	O
,	O
especially	O
on	O
Unix-like	B-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
ngrep	B-Protocol
default	O
behavior	O
is	O
to	O
drop	O
privileges	O
in	O
those	O
platforms	O
,	O
running	O
under	O
a	O
specific	O
unprivileged	O
user	O
.	O
</s>
<s>
Like	O
tcpdump	B-Protocol
,	O
it	O
is	O
also	O
possible	O
to	O
use	O
ngrep	B-Protocol
for	O
the	O
specific	O
purpose	O
of	O
intercepting	O
and	O
displaying	O
the	O
communications	O
of	O
another	O
user	O
or	O
computer	O
,	O
or	O
an	O
entire	O
network	B-Architecture
.	O
</s>
<s>
A	O
privileged	O
user	O
running	O
ngrep	B-Protocol
in	O
a	O
server	O
or	O
workstation	O
connected	O
to	O
a	O
device	O
configured	O
with	O
port	B-Protocol
mirroring	I-Protocol
on	O
a	O
switch	O
,	O
router	B-Protocol
,	O
or	O
gateway	B-Application
,	O
or	O
connected	O
to	O
any	O
other	O
device	O
used	O
for	O
network	B-Architecture
traffic	O
capture	O
on	O
a	O
LAN	B-General_Concept
,	O
MAN	O
,	O
or	O
WAN	O
,	O
can	O
watch	O
all	O
unencrypted	O
information	O
related	O
to	O
login	O
ID	O
's	O
,	O
passwords	O
,	O
or	O
URLs	O
and	O
content	O
of	O
websites	O
being	O
viewed	O
in	O
that	O
network	B-Architecture
.	O
</s>
