原文连接:https://www.trustwave.com/Resources/SpiderLabs-Blog/Cuckoo--Linux-Subsystem--Some-Love-for-Windows-10/

感谢这个作者的文章,真的就很方便快捷去配置环境了。这里来记录一下配置和使用的方法:

一、部署Windows Subsystem for Linux

跟着官方文档的步骤进行安装 https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

1.打开PowerShell,输入下面命令启用该功能,重启

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

2.在应用商店中安装一个linux应用,我装的是ubuntu

3.在ubuntu的命令窗口中进行安装下面的模块,win7系统中我直接安装的mongodb,但是目前实验的还不能正确使用网页模式(https://www.cnblogs.com/xuanmanstein/p/7991589.html)

# Get latest updates
$ sudo apt-get update
$ sudo apt-get upgrade

# Install LAMP server
$ sudo apt-get install lamp-server^

# Install MongoDB
$ sudo apt-get install mongodb

# Run Apache, MySQL and MongoDB
$ sudo service apache2 start
$ sudo service mysql start
$ sudo service mongodb start

我安装的时候在apache2和mysql开启的时候报错,但不影响主要功能。

二、安装cuckoo

我是用的python版本是2.7.12

1.cmd输入命令 pip install cuckoo, 开始安装cuckoo(在windows7上也可以安装),这个命令会安装cuckoo的必须库,如果某一个失败了,可以继续执行pip install cuckoo

2.cmd输入命令cuckoo init,然后在%USERPROFILE%\.cuckoo (C:\Users\<username>\.cuckoo)路径下就会生成一个.cuckoo文件夹,我们可以在这个里面进行虚拟机配置和查看分析后的文件。

3.cmd输入命令 cuckoo community,下载特征库文件

4.cmd输入命令 cuckoo -d 开始分析,这种方式的结果只有json比较详细,生成的html很简略,安装了mongodb的情况下可以使用 cuckoo web runserver命令,使用网页进行提交和查看详细的分析结果。

5.cmd输入命令cuckoo submit  path,可以提交样本。安装了mongodb的情况下可以在网页中直接提交。

6.Yaya:http://yara.readthedocs.io/en/v3.4.0/gettingstarted.html#installing-on-windows

7.Volatility:

C:\> pip install distorm3
C:\> pip install pycrypto
C:\> pip install volatility

8.MySQL

C:\> easy_install mysql-python

三、主机配置

1.%USERPROFILE%\.cuckoo (C:\Users\<username>\.cuckoo)路径下找到conf文件,修改里面的配置文件

cuckoo.conf
[database]
connection = mysql://cuckoo:cuckoo@127.0.0.1/cuckoo
# NOTE: I created a MySQL user 'cuckoo' with 'cuckoo' as the password and a database name of 'cuckoo'
# 我暂时没使用这个功能 auxillary.conf
[sniffer]
enabled = yes
tcpdump = c:\tools\tcpdump\tcpdump.exe
# NOTE: the location path depends on where you installed windump.exe. And I renamed windump.exe to tcpdump.exe vmware.conf
[vmware]
# Specify which Vmware Workstation mode you want to run your machines on.
# Can be "gui" or "nogui". Refer to VMware's official
# documentation to understand the differences.
mode = gui # Path to the local installation of the vmrun utility.
path = D:\VMware\vmrun.exe # Specify a comma-separated list of available machines to be used. For each
# specified ID you have to define a dedicated section containing the details
# on the respective machine. (E.g. cuckoo1,cuckoo2,cuckoo3)
machines = cuckoo1 [cuckoo1]
# Specify the path to vmx file of this virtual machine.
vmx_path = C:\VM\Windows x64\Windows x64.vmx # Specify the snapshot name to use.
snapshot = cuckoo # Specify the operating system platform used by current machine
# [windows/darwin/linux].
platform = windows # Specify the IP address of the current virtual machine. Make sure that the
# IP address is valid and that the host machine is able to reach it. If not,
# the analysis will fail.
ip = 192.168.56.128 reporting.conf
[mongodb]
enabled = yes

2.windump: https://www.winpcap.org/windump/install/default.htm,cuckoo中的C:⧵Python27⧵Lib⧵site-packages⧵cuckoo⧵auxiliary⧵sniffer.py文件使用windump分析结果,这个文件可以稍作一下修改适配windows

下面增加了一个  '\r'和tcpdump.exe的路径

for line in err.split("\r\n"):

if not line continue or line.startswith(err_whitelist_start):

continue

err_whitelist_start = (

"tcpdump: listening on ",

"c:\\tools\\tcpdump\\tcpdump.exe: listening on ",

)

3.cuckoo的配置是仅主机模式,可以修改下面的host,使用主机名来进行通信,使用NAT网络,来抓捕网络事件。

四、客户机

1.我使用的vmware,还是仅主机模式,首先配置host的Ip,在主机中将VMnet1配置位192.168.56.1

       

2.虚拟机中安装python,安装pillow库(使用NAT模式)

pip install pillow

3.虚拟机中配置静态Ip:192.168.56.128(选择自定义的VMnet1网络,配置静态IP)

4.将%USERPROFILE%\.cuckoo (C:\Users\<username>\.cuckoo)路径下的agent文件拷贝到虚拟机中,运行,保存镜像

现在就可以用第二步中的cuckoo -d 或 cuckoo web runserver来等待任务进行分析了。

五、遇到的问题

1.在reporting.conf中开启HTML和PDF保存,PDF需要weasyprint库,这个库需要依赖其他文件

This was solved for me by installing the following dependencies on Ubuntu:

 sudo apt-get install libpango1.0-0
 sudo apt-get install libcairo2
 sudo apt-get install libpq-dev

Check out the dependencies at the link:

http://weasyprint.readthedocs.io/en/latest/install.html

2.虚拟机需要关闭防火墙,关闭自动升级,关闭UAC,否则可能遇到问题

Win10上使用Linux Subsystem配置cuckoo sandbox的更多相关文章

  1. 从零搭建配置Cuckoo Sandbox

    1.安装依赖 $ sudo apt-get install git mongodb libffi-dev build-essential python-django python python-dev ...

  2. Install Ubuntu On Windows10(win10上安装linux系统)

    一.准备: 硬件:U盘 软件:ultraiso.Ubuntu镜像文件 二.安装linux: 1.Ubuntu官网(http://www.ubuntu.org.cn/download/alternati ...

  3. win10上使用linux命令

    (1)可以用windows自带的powershell,但是 ll,vim等命令不能使用 (2)Windows更新==>针对开发人员==>开启开发人员模式,然后在控制面板==>程序与功 ...

  4. 1、win10下连接本地系统上的Linux操作系统(分别以Nat方式和桥接模式实现)

    1.win10下连接本地系统上的Linux操作系统(分别以Nat方式和桥接模式实现) 一.准备知识:win10下打开Administrator的方式 在win10操作系统中,Administrator ...

  5. 在Linux上怎么安装和配置Apache Samza

    samza是一个分布式的流式数据处理框架(streaming processing),它是基于Kafka消息队列来实现类实时的流式数据处理的.(准确的说,samza是通过模块化的形式来使用kafka的 ...

  6. 在Linux上怎么安装和配置DenyHosts工具

    使用DenyHosts能够进行自动屏ip的功能,掌握DenyHosts在Linux系统中的安装是很有必要的,那么在Linux系统中要如何安装DenyHosts工具呢?安装后又要如何配置呢?这都是用户需 ...

  7. Linux平台上轻松安装与配置Domino

    Linux平台上轻松安装与配置Domino Domino Server的编译安装过程中需要用到libstdc++-2.9和glibc-2.1.1(或者其更高的版本)两个编译模块,它们是Linux开发编 ...

  8. Dart SDK在Linux上的下载及配置

    Dart SDK在Linux上的下载及配置 首先建议想要学习Dart的小伙伴选择Linux开发环境比较好,具体原因就不多说了.如果想要尝试在Window或Mac上安装Dart SDK的话可以参考Ins ...

  9. Win10上部署Apollo配置中心

    基于Docker在Win10上部署Apollo配置中心 https://www.jianshu.com/p/a1215056ce75 http://nobodyiam.com/2016/07/09/i ...

随机推荐

  1. Windbg and resources leaks in .NET applications 资源汇总

    Windows Forms Leaks 1.http://blogs.msdn.com/b/tess/archive/2008/02/04/net-debugging-demos-informatio ...

  2. SQL 增加列

    -- 判断是否存在该列 if exists(SELECT * FROM syscolumns WHERE id=object_id('@Table') and name='@COLUMN') ALTE ...

  3. 解决IIS中Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

  4. Beginning Asp.Net Security 读书笔记-----XSS

    几个月前通过Veracode对代码进行动态和静态安全扫描,扫出了数以千计的安全bug,基本上都是top 10的,安全漏洞. 其中CWE80,CWE601数量最多.具体CWE的定义可参考http://c ...

  5. 【总结】 NOIp2018考时经历记

    可能我因为比较菜的原因,还是要写一下这个东西! 发布时间迟与更新时间,毕竟浙江选手为先例 那么希望NOIp8102RP++!!! 突然发现博客园支持更新创作时间了,那么就不咕了! 本次NOIp感受很深 ...

  6. 在线编辑器Ckeditor (2) - php (31)

    接上一篇 3 in-page(页内)配置,在使用Ckeditor的界面里进行直接配置 页内配置 效果 特点:配置项完全属于某个特定的Ckeditor实例,不可重用 三种配置方式比较 定制方式 特点 说 ...

  7. “全栈2019”Java多线程第二章:创建多线程之继承Thread类

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java多 ...

  8. 配置DNS服务器转发器

    1.(windows server 2008 r2)控制面板->管理工具->服务器管理器->DNS->服务器图标->属性 2.转发器->编辑 3.填写DNS并点击确 ...

  9. jquery分页插件pagination

    参考1:https://www.cnblogs.com/jingping/p/3925976.html 参考2:https://segmentfault.com/a/1190000014487357 ...

  10. 【git】——简单用法

    git 更新远程代码到本地 git fetch origin master git merge origin/master 冲突: Your local changes to the followin ...