SIPGREP(8)
π SIPGREP π (section 8, bestie)
okay so listen. this is sipgrep, it lives in the user manuals, and it's literally grep but for SIP packets. yes. that's the whole vibe. let's get into it π«Ά
β¨ SYNOPSIS β¨
sipgrep <-ahNViwgGJpevxlDTRMmqCJj> <-IO pcap_dump > < -n num > < -d dev
> < -A num > < -s snaplen > < -S limitlen > < -c contact user > < -j
user agent > < -f from user > < -t to user > < -H capture URL > < -q
seconds > < -P portrange > < -F file > < match expression > < bpf filter
>
likeβ¦ look at her. so many little flags. she's got options, she's got range π
πΈ DESCRIPTION πΈ
so sipgrep is out here striving to provide most of GNU grep's common features, but applying them to the SIP signaling protocol instead of boring text files. no cap.
she's pcap-aware, which means you can throw extended regular expressions at her and she'll match them against the data payloads of SIP packets β plus you get application-specific filtering options on top, which is the little extra sprinkle β¨
she also understands filter logic common to other packet sniffing tools, like tcpdump(8) and sipgrep(1). iykyk.
π OPTIONS π
okay this is the part you actually came for. every single one, no skipping, periodt.
-hβ Display help/usage information. (she's helpful like that π)-Vβ Display version information.-eβ Display empty packets.-iβ Ignore case.-vβ Invert match.-Rβ Do not try to drop privileges to theDROPPRIVS_USER.
so here's the tea: sipgrep makes no effort to validate input from live or offline sources, because she is focused more on performance and on handling large amounts of data than on protocol correctness. most of the time that's a fair assumption to make, lowkey.
but sometimes it actually matters, so as a rule sipgrep will try to be defensive and drop any root privileges it might have. queen behaviour honestly.
that said, there exist scenarios where this behaviour can become an obstacle, so this option is here for end-users who want to disable the feature β but you have to do it with an understanding of the risks. because packets can be randomly malformed, or even specifically designed to overflow sniffers and take control of them π and revoking root privileges is currently the only risk mitigation sipgrep employs against such an attack.
so likeβ¦ use this option and turn it off at your own risk. i'm not joking, bestie. this is the scary one π
-wβ Match the regex expression as a word.-pβ Don't put the interface into promiscuous mode.-lβ Make stdout line buffered.-Dβ When readingpcap_dumpfiles, replay them at their recorded time intervals (mimic realtime).-Tβ Print a timestamp in the form of+S.UUUUUU, indicating the delta between packet matches.-mβ Disable SIP Dialog matching.-Mβ Disable multi-line match (prefers single-line match instead).-I pcap_dumpβ Input filepcap_dumpintosipgrep. Works with any pcap-compatible dump file format. This option is useful for searching for a wide range of different patterns over the same packet stream.-O pcap_dumpβ Output matched packets to a pcap-compatible dump file. This feature does not interfere with normal output to stdout.-n numβ Match onlynumpackets total, then exit.-A numβ Dumpnumpackets of trailing context after matching a packet.-s snaplenβ Set the bpf caplen tosnaplen(default65536).-S limitlenβ Set the upper limit on the size of packets thatsipgrepwill look at. Useful for looking at only the first N bytes of packets without changing the BPF snaplen.-Cβ Do not use colors in stdout.-cβ Match user inContact:SIP header.-fβ Match user inFrom:SIP header.-tβ Match user inTo:SIP header.-F fileβ Read in the bpf filter from the specified filename. This is a compatibility option for users familiar withtcpdump. Please note that specifying`-F`will override any bpf filter specified on the command-line.-H ip:portβ Duplicate matching traffic to HEP Capture Server / HOMER.-Nβ Show sub-protocol number along with single-character identifier (useful when observing raw or unknown protocols).-gβ Disable clean-up of Dialogs during trace.-Gβ Print Dialogs report during trace.-Jβ Automatically send SIP packet-of-death to SipVicious scanners (kill).-jβ For matching user-agent strings send SIP packet-of-death to SipVicious scanners (kill).-qβ Terminatesipgrepafter a specified number of seconds.-aβ Enable packet re-assemblation.-Pβ Specify SIP port range (default5060-5061).-d devβ By defaultsipgrepwill select a default interface to listen on. Use this option to forcesipgrepto listen on interfacedev.
π¦ DIAGNOSTICS π¦
Errors from sipgrep, libpcap, and the GNU regex library are all output to stderr. so if something's screaming, that's where you look π
π AUTHOR π
Written by Alexandr Dubovikov <alexandr.dubovikov@gmail.com>. legend behaviour fr fr π
π REPORTING BUGS π
Please report bugs to the sipgrep Bug Tracker, located at
https://github.com/sipcapture/sipgrep/issues
Non-bug, non-feature-request general feedback should be sent to the author directly by email. (yes, actual email. old school. iconic π)
β NOTES β
ALL YOUR BASE ARE BELONG TO HOMER. π that's it. that's the note.
and that's the whole page, bestie β brought to you by *nux, dated March 2014, and yeah the footer says SIPGREP(8) too because she's consistent like that. now go grep some SIP packets and slay π
β¨
π¦ where this page comes from
- debian trixie: sipgrep 2.2.0-2 Β· GPL-3.0-or-later
- ubuntu noble: sipgrep 2.2.0-2 Β· GPL-3.0-or-later
- ubuntu questing: sipgrep 2.2.0-3
- ubuntu resolute: sipgrep 2.2.0-3build1 Β· GPL-3.0-or-later
- ubuntu stonking: sipgrep 2.2.0-3build1 Β· GPL-3.0-or-later
- Copyright (c) 2014 Alexandr Dubovikov <alexandr.dubovikov@gmail.com>
- Copyright (c) 2014 Sipcapture.org <support@sipcapture.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms