1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | PortGroup python 1.0 |
---|
9 | |
---|
10 | github.setup cuckoobox cuckoo 1.2 |
---|
11 | categories security |
---|
12 | maintainers yahoo.fr:jul_bsd openmaintainer |
---|
13 | description automated dynamic malware analysis system |
---|
14 | long_description ${description} |
---|
15 | license GPL-3 |
---|
16 | platforms darwin |
---|
17 | homepage http://www.cuckoosandbox.org/ |
---|
18 | |
---|
19 | checksums rmd160 3f9445e4b9a17de04715965d6d0d1e67596f0976 \ |
---|
20 | sha256 c60820bf50deddbba1f3ac1b1397689240a526cf6d35013bd045e3f7a05d785a |
---|
21 | |
---|
22 | ## Note: requires ? |
---|
23 | #python.versions 27 |
---|
24 | python.default_version 27 |
---|
25 | |
---|
26 | add_users cuckoo group=cuckoo home=${prefix}/var/cuckoo shell=/sbin/nologin realname=cuckoo\ user |
---|
27 | |
---|
28 | |
---|
29 | depends_build port:yara port:volatility port:libvirt-python |
---|
30 | |
---|
31 | ## FIXME! need to do options: pefile, maec python bindings; note py-bson is integrated in py-pymongo |
---|
32 | if {${python.version} != ""} { |
---|
33 | depends_build-append port:py${python.version}-sqlalchemy \ |
---|
34 | port:py${python.version}-pymongo \ |
---|
35 | port:py${python.version}-dpkt port:py${python.version}-jinja2 \ |
---|
36 | \ |
---|
37 | port:py${python.version}-magic port:py${python.version}-bottle \ |
---|
38 | port:py${python.version}-chardet port:py${python.version}-deep \ |
---|
39 | port:py${python.version}-pefile port:py${python.version}-maec |
---|
40 | } |
---|
41 | |
---|
42 | use_configure no |
---|
43 | build {} |
---|
44 | |
---|
45 | destroot { |
---|
46 | set rootdir ${prefix}/var/cuckoo |
---|
47 | |
---|
48 | xinstall -d -m 755 ${destroot}${rootdir} |
---|
49 | xinstall -m 755 ${worksrcpath}/cuckoo.py ${destroot}${rootdir}/ |
---|
50 | foreach f { agent analyzer conf data docs lib modules tests utils web } { |
---|
51 | copy ${worksrcpath}/${f} ${destroot}${rootdir}/ |
---|
52 | } |
---|
53 | |
---|
54 | ## No install setup, doing our own tree |
---|
55 | reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|g" ${destroot}${rootdir}/cuckoo.py |
---|
56 | } |
---|
57 | |
---|
58 | if {${subport} eq ${name}} { |
---|
59 | |
---|
60 | |
---|
61 | conflicts ${name}-devel |
---|
62 | } |
---|
63 | |
---|
64 | notes " |
---|
65 | |
---|
66 | By default, Cuckoo will rely on Virtualbox as guest virtualization software. |
---|
67 | You will have to install separately through macports or manually. |
---|
68 | |
---|
69 | Cuckoo use tcpdump which needs root privilege. |
---|
70 | (???) Only option on MacOS is to put tcpdump binary as setuid |
---|
71 | $ sudo chmod +s /usr/sbin/tcpdump |
---|
72 | |
---|
73 | |
---|
74 | To finish configuration, |
---|
75 | http://docs.cuckoosandbox.org/en/latest/ |
---|
76 | |
---|
77 | 1) Setup Database: MongoDB (default) or Mysql |
---|
78 | $ sudo port load mongodb |
---|
79 | 2) Check configuration files |
---|
80 | 3) Create a guest VM: WinXPsp3 is recommended, but Win7 with UAC |
---|
81 | disabled is supported too. |
---|
82 | Follow documentation how to prepare guest. It shout at least |
---|
83 | contains Python 2.7. |
---|
84 | Network should be host-only with some proper forwarding and |
---|
85 | filtering configuration. |
---|
86 | |
---|
87 | |
---|
88 | http://advancedmalwareprotection.blogspot.ca/2012/03/installing-cuckoo-on-max-os-x-lion.html |
---|
89 | http://blog.spiderlabs.com/2012/01/cuckoo-for-cuckoo-box.html |
---|
90 | " |
---|
91 | |
---|
92 | #subport ${name}-devel { |
---|
93 | # master_sites https://github.com/cuckoobox/cuckoo/archive/ |
---|
94 | # version 20150305 |
---|
95 | # distname d34f13b06cc8f362e0cb76edccf8dafd2033f8f9 |
---|
96 | # checksums rmd160 7bcc1267d1fb5fc11f679a282606bc088b438a05 \ |
---|
97 | # sha256 ca4f7bea748340fc9ab092575de6c340ed75b159a49088b2cdafd4e531e6f9e1 |
---|
98 | # |
---|
99 | # conflicts ${name} |
---|
100 | #} |
---|
101 | |
---|
102 | default_variants +django |
---|
103 | variant django description { use django + mongodb backend } { |
---|
104 | #depends_run-append port:mongodb port:py${python.version}-pymongo port:py${python.version}-django |
---|
105 | depends_run-append port:mongodb port:py${python.version}-django |
---|
106 | } |
---|
107 | |
---|