Skip to content

Commit

Permalink
Renaming file with meaningful name. Updating README.md accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
mshafeeqkn committed Jul 12, 2022
1 parent d3d9025 commit fd5535b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
CFLAGS=-g -Os -Wall -Werror

all: srtp.o srtp-decrypt.o
$(CC) -o srtp-decrypt srtp-decrypt.o srtp.o -lpcap -lgcrypt
all: srtp.o srtp-util.o
$(CC) -o srtp-util srtp-util.o srtp.o -lpcap -lgcrypt

clean:
rm -rf srtp-decrypt *.o
rm -rf srtp-util *.o

check:
./srtp-decrypt -k aSBrbm93IGFsbCB5b3VyIGxpdHRsZSBzZWNyZXRz < ./marseillaise-srtp.pcap | text2pcap -t "%M:%S." -u 10000,10000 - - > ./marseillaise-rtp.pcap
./srtp-decrypt -E -k aSBrbm93IGFsbCB5b3VyIGxpdHRsZSBzZWNyZXRz < ./marseillaise-rtp.pcap | text2pcap -t "%M:%S." -u 10000,10000 - - > ./marseillaise-srtp-new.pcap
# Decrypt the pcap
./srtp-util -k aSBrbm93IGFsbCB5b3VyIGxpdHRsZSBzZWNyZXRz < ./marseillaise-srtp.pcap | text2pcap -t "%M:%S." -u 10000,10000 - - > ./marseillaise-rtp.pcap
# Encrypt already decrypted pcap
./srtp-util -E -k aSBrbm93IGFsbCB5b3VyIGxpdHRsZSBzZWNyZXRz < ./marseillaise-rtp.pcap | text2pcap -t "%M:%S." -u 10000,10000 - - > ./marseillaise-srtp-new.pcap
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
srtp-decrypt
============
## srtp-util
srtp-util is a tool that deciphers SRTP / ciphers RTP packets contained in a network capture. It needs the Master Key
exchanged by other means to do its job. The output is dumped in such a way that output can be fed to text2pcap, to recreate a pcap.

srtp-decrypt is a tool that deciphers SRTP packets contained in a network capture. It needs the Master Key exchanged by other means to do its job.
Deciphered RTP is dumped in such a way that output can be fed to text2pcap, to recreate a deciphered capture.
_Refer Makefile for usage example_

dependencies
============
## dependencies
SRTP part has been taken from VLC project. It depends on `libgcrypt` for ciphering and MAC.
Pcap processing is based on `libpcap`.

SRTP part has been taken from VLC project. It depends on libgcrypt for ciphering and MAC.
Pcap processing is based on libpcap.
Typically, on Debian,
`# apt-get install libpcap-dev libgcrypt-dev.`

Typically, on Debian, # apt-get install libpcap-dev libgcrypt-dev.

caveats
=======

Isolating a single RTP flow from a network capture is a hard job, too hard to be done in this tool. Hence, srtp-decrypt expects to process a single RTP flow.
## caveats
Isolating a single RTP flow from a network capture is a hard job, too hard to be done in this tool. Hence, srtp-util expects to process a single RTP flow.
Network capture shall not contain ICMP, ARP or reverse RTP flow for example, as those packets will not be deciphered correctly by the tool.
Moreover, RTP offset in frames is expected to be constant, by default 42, but can be set to 46 in case of 802.1q tagging.
File renamed without changes.

0 comments on commit fd5535b

Please sign in to comment.