Skip to content
This repository was archived by the owner on Feb 28, 2019. It is now read-only.

Commit c8e885b

Browse files
committed
Initial Commit
0 parents  commit c8e885b

13 files changed

+243
-0
lines changed

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
docs/_build
2+
tmp.py
3+
4+
*.py[cod]
5+
6+
# emacs
7+
*~
8+
._*
9+
.\#*
10+
\#*\#
11+
12+
# C extensions
13+
*.so
14+
15+
# Packages
16+
*.egg
17+
*.egg-info
18+
dist
19+
build
20+
eggs
21+
parts
22+
bin
23+
var
24+
sdist
25+
develop-eggs
26+
.installed.cfg
27+
lib
28+
lib64
29+
30+
# Installer logs
31+
pip-log.txt
32+
33+
# Unit test / coverage reports
34+
.coverage
35+
.tox
36+
nosetests.xml
37+
38+
# Translations
39+
*.mo
40+
41+
# Mr Developer
42+
.mr.developer.cfg
43+
.project
44+
.pydevproject
45+
46+
# Vim
47+
*.sw[op]

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
APTDetector Changelog
2+
=================
3+
4+
Since February 7, 2016 there have been 0 releases and 1 commits for
5+
an average of zero 0-commit release every 0 weeks.
6+
7+
0.1
8+
------
9+
10+
created the basic structure of the project.
11+
12+
* Used [CapTipper][CapTipper] as the base for network analysis module
13+
14+
0.0
15+
------
16+
*(February 7, 2016)*
17+
18+
Project Started.
19+
20+
21+
[CapTipper]: http://captipper.readthedocs.org/en/latest/

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Copyright (c) 2016, Abouzar Parvan
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above
11+
copyright notice, this list of conditions and the following
12+
disclaimer in the documentation and/or other materials provided
13+
with the distribution.
14+
15+
* The names of the contributors may not be used to endorse or
16+
promote products derived from this software without specific
17+
prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# APTDetector
2+
3+
*Advanced Persistent Threat Detection by Using Network Analysis*
4+
5+
**APTDetector** is a humble try to gather all means of malware detection
6+
from network analysis in one place, for educational purposes only.
7+
8+
* use [CapTipper][CapTipper] as the base for network analysis module
9+
* use [Cuckoo Sandbox][Cuckoo] as automated malware detection
10+
11+
12+
APTDetector is tested against Python 3.4, 3.5, and
13+
PyPy. [Full and extensive docs are available on Read The Docs.][rtd]
14+
See what's new [by checking the CHANGELOG][changelog].
15+
16+
[rtd]: https://aptdetector.readthedocs.org/en/latest/
17+
[changelog]: https://github.com/abzcoding/aptdetector/blob/master/CHANGELOG.md
18+
19+
[CapTipper]: http://captipper.readthedocs.org/en/latest/
20+
[Cuckoo]: https://downloads.cuckoosandbox.org/docs/
21+
22+
## Installation
23+
24+
APTDetector can be added to a project in a few ways. There's the obvious one:
25+
26+
```
27+
pip install aptdetector
28+
```
29+
30+
Then, [thanks to PyPI][aptdetector_pypi], dozens of boltons are just an import away:
31+
32+
```python
33+
import parse_pcap
34+
from aptdetector.network.sniffer import urlFindler
35+
urlFinder.pcap_file = pcap_file[0]
36+
parse_pcap.run(urlFinder.pcap_file)
37+
urlFinder()
38+
```
39+
40+
However, due to the nature of utilities, application developers might
41+
dependencies. See the [Integration][integration] section of the docs
42+
43+
[aptdetector_pypi]: https://pypi.python.org/pypi/aptdetector
44+
[integration]: https://aptdetector.readthedocs.org/en/latest/architecture.html#integration
45+
46+
## Disclaimer
47+
48+
Please do not use this program in production!!
49+
it's an educational project only.
50+
51+
## References
52+
I've used based my work loosely on some respectful papers
53+
that i've linked below:
54+
* [Packet sniffing a brief introduction][packetsniff]
55+
* [Persistent threats and how to monitor and deter them][persistentthreat]
56+
* [Effective and Efficient Malware Detection at the End Host][effectivemalware]
57+
* [Detecting APT Activity with Network Traffic Analysis][detectingapt]
58+
* [Inspecting DNS Flow Traffic for Purposes of Botnet Detection][inspectingdns]
59+
* [BotMiner: Clustering Analysis of Network Traffic for Protocol- and Structure-Independent Botnet Detection][botminer]
60+
* [Panorama: Capturing System-Wide Information Flow for Malware Detection and Analysis][panorama]
61+
62+
[packetsniff]: http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1166620&url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F45%2F26303%2F01166620.pdf%3Farnumber%3D1166620
63+
[persistentthreat]: http://www.sciencedirect.com/science/article/pii/S1353485811700861
64+
[effectivemalware]: https://www.usenix.org/legacy/event/sec09/tech/full_papers/kolbitsch.pdf
65+
[detectingapt]: http://www.trendmicro.com/cloud-content/us/pdfs/security-intelligence/white-papers/wp-detecting-apt-activity-with-network-traffic-analysis.pdf
66+
[inspectingdns]: http://geant3.archive.geant.net/Media_Centre/Media_Library/Media%20Library/gn3_jra2_t4_M4_deliverable.pdf
67+
[botminer]: http://usenix.org/legacy/event/sec08/tech/full_papers/gu/gu_html/index.html
68+
[panorama]: http://dl.acm.org/citation.cfm?id=1315261
69+
70+
## Gaps
71+
72+
Found something missing in the standard library that should be in
73+
`aptdetector`? Found something missing in `aptdetector`? First, take a
74+
moment to read the very brief [architecture statement][architecture] to make
75+
sure the functionality would be a good fit.
76+
77+
Then, if you are very motivated, submit [a Pull Request][prs]. Otherwise,
78+
submit a short feature request on [the Issues page][issues], and we will
79+
figure something out.
80+
81+
[architecture]: https://aptdetector.readthedocs.org/en/latest/architecture.html
82+
[issues]: https://github.com/abzcoding/aptdetector/issues
83+
[prs]: https://github.com/abzcoding/aptdetector/pulls

TODO.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
TODO
2+
====
3+
4+
- extracting urls from network traffic
5+
- create a workflow for automated malware detection
6+
7+
network
8+
----------
9+
10+
- implement network sniffer
11+
12+
malware
13+
----------
14+
15+
- try to connect to Cuckoo Sandbox

aptdetector/__init__.py

Whitespace-only changes.

aptdetector/malware/__init__.py

Whitespace-only changes.

aptdetector/network/__init__.py

Whitespace-only changes.

requirements-rtd.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinxcontrib-napoleon
2+
# sphinx_rtd_theme # you'll need sphinx_rtd_theme for local dev

requirements-test.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
py==1.4.31
2+
pytest==2.8.7
3+
tox==2.3.1
4+
virtualenv==14.0.5

setup.py

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
"""Advanced Persistent Threat Detection by
2+
Using Network Analysis.
3+
4+
used as a package or independently. `documented on Read
5+
the Docs <http://aptdetector.readthedocs.org>`_.
6+
"""
7+
8+
from setuptools import setup
9+
10+
11+
__author__ = 'Abouzar Parvan'
12+
__version__ = '0.1'
13+
__contact__ = '[email protected]'
14+
__url__ = 'https://github.com/abzcoding/APTDetector'
15+
__license__ = 'BSD'
16+
17+
18+
setup(name='APTDetector',
19+
version=__version__,
20+
description="Advanced Persistent Threat Detection by Using Network Analysis.",
21+
long_description=__doc__,
22+
author=__author__,
23+
author_email=__contact__,
24+
url=__url__,
25+
packages=['aptdetector'],
26+
include_package_data=True,
27+
zip_safe=False,
28+
license=__license__,
29+
platforms='linux_x86_64',
30+
classifiers=[
31+
'Topic :: Security',
32+
'Intended Audience :: Education',
33+
'Topic :: System :: Networking',
34+
'Development Status :: 1 - Planning',
35+
'Programming Language :: Python :: 3.4',
36+
'Programming Language :: Python :: 3.5', ]
37+
)

tests/__init__.py

Whitespace-only changes.

tox.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tox]
2+
envlist = py34,py35,pypy
3+
[testenv]
4+
deps = -rrequirements-test.txt
5+
commands = py.test --doctest-modules aptdetector tests

0 commit comments

Comments
 (0)