Skip to content

Commit be86068

Browse files
authored
Merge pull request #7 from Arcopix/alpha4
Alpha4
2 parents 57b67ff + 43dbb91 commit be86068

File tree

7 files changed

+226
-46
lines changed

7 files changed

+226
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.remoteShark.py.swp
22
remoteShark.spec
33
__pycache__
4+
ssh.debug

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## Alpha 4
4+
* Host validation no longer accepts hosts starting with '-'
5+
* Implemented experimental support for reading pcap file on the remote system
6+
* Also supports packet captures compressed with gz (if extension is .gz)
7+
* Also supports packet captures compressed with gz (if extension is .bz2)
8+
* Validation methods of AppConfig are now private
9+
* Implemented --port|-p argument which specifies the SSH port
10+
* Implemented compression on SSH level (enabled by -c|--compression)
11+
* Fixed support for ampersand symbol for packet capture filter
12+
313
## Alpha 3
414

515
* Implemented a check if the remote host key is in _known_hosts_

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ A set of utilities allowing the user to capture traffic in real-time from remote
1111

1212
## HOWTO
1313

14+
### Listing interfaces
15+
1416
Listing interfaces on remote system `10.20.30.40`:
1517
> `remoteShark.py 10.20.30.40 --list-interfaces`
1618
19+
### Live packet captures
20+
1721
Capture any traffic on remote system `10.20.30.40`:
1822
> `remoteShark.py 10.20.30.40`
1923
@@ -29,6 +33,22 @@ Capture SIP traffic (`port 5060 or 5061`) for 100 packets on any interface on re
2933
Capture SMTP traffic (`port 25`) for 5 minutes (300 seconds) on eth0.44 interface on remote system `10.20.30.40`:
3034
> `remoteShark.py 10.20.30.40 -f "port 25" -t 300 -i eth0.44`
3135
36+
### Processing remote PCAP files
37+
38+
Load file `/tmp/capture.pcap` from the remote system into Wireshark
39+
> `remoteShark.py 10.20.30.40:/tmp/capture.pcap`
40+
41+
Load file `/tmp/capture.pcap` and filter HTTP traffic from it:
42+
> `remoteShark.py 10.20.30.40:/tmp/capture.pcap -f "port 80"`
43+
44+
Load the first 100 packets from file `/tmp/capture.pcap`:
45+
> `remoteShark.py 10.20.30.40:/tmp/capture.pcap -c 100`
46+
47+
Load from file `/tmp/capture.pcap` for 5 seconds:
48+
> `remoteShark.py 10.20.30.40:/tmp/capture.pcap -t 5`
49+
50+
**Note:** this means that the system will be loading it for 5 seconds, and not the first 5 seconds of the remote packet capture
51+
3252
## TODO
3353

3454
Current TODO/DONE list is available in [TODO](TODO.md)

TODO.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
2. Fully test (and bugfix) for Mac
44
5. Fully test and bugfix
5-
7. Work with remote pcap files
65
8. Split remoteShark.py into a library and have basic scripts which execute the behavior _(?)_
6+
9. Support for display filter in local Wireshark
7+
11. Update project dir tree (remove win/linux dirs, move sources to src)
8+
12. Build system for compiling via pyinstaller
79

810
## DONE
911

@@ -14,4 +16,7 @@
1416
5. Implement -i|--interface options to select correct interface
1517
6. Check if the remote host key is in _known_hosts_
1618
7. Detection of *HOST* between *FQDN* and *IP* address
17-
8. Detached Wireshark in Linux _(?)_
19+
8. Detached Wireshark in Linux _(?)_
20+
9. Work with remote pcap files
21+
10. Support for non-standard SSH port
22+
11. Implement compression of the data stream

linux/remote-pcap-compress

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
ssh root@$1 "tcpdump -ni $2 -s 0 -w - $3 2>/dev/null | gzip -9 -c -f" | gzip -d | wireshark -k -i -
4+
5+

ms-version.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# UTF-8
2+
#
3+
# For more details about fixed file info 'ffi' see:
4+
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
5+
VSVersionInfo(
6+
ffi=FixedFileInfo(
7+
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
8+
# Set not needed items to zero 0.
9+
filevers=(1, 0, 0, 0),
10+
prodvers=(1, 0, 0, 0),
11+
# Contains a bitmask that specifies the valid bits 'flags'r
12+
mask=0x3f,
13+
# Contains a bitmask that specifies the Boolean attributes of the file.
14+
flags=0x0,
15+
# The operating system for which this file was designed.
16+
# 0x4 - NT and there is no need to change it.
17+
OS=0x4,
18+
# The general type of file.
19+
# 0x1 - the file is an application.
20+
fileType=0x1,
21+
# The function of the file.
22+
# 0x0 - the function is not defined for this fileType
23+
subtype=0x0,
24+
# Creation date and time stamp.
25+
date=(0, 0)
26+
),
27+
kids=[
28+
StringFileInfo(
29+
[
30+
StringTable(
31+
u'040904B0',
32+
[StringStruct(u'CompanyName', u'Devhex Ltd'),
33+
StringStruct(u'FileDescription', u'remoteShark utility'),
34+
StringStruct(u'FileVersion', u'1.0.0.0'),
35+
StringStruct(u'InternalName', u'remoteShark'),
36+
StringStruct(u'LegalCopyright', u'GPLv3'),
37+
StringStruct(u'OriginalFilename', u'remoteShark.exe'),
38+
StringStruct(u'ProductName', u'remoteShark'),
39+
StringStruct(u'ProductVersion', u'1.0.0 (alpha4)')])
40+
]),
41+
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
42+
]
43+
)

0 commit comments

Comments
 (0)