<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>4A616D6573</title>
 <link href="http://4a616d6573.com//atom.xml" rel="self"/>
 <link href="http://4a616d6573.com//"/>
 <updated>2021-12-28T23:04:29+00:00</updated>
 <id>http://4a616d6573.com/</id>
 <author>
   <name>James</name>
   <email></email>
 </author>

 
 <entry>
   <title>Configuring Simple Victim and Sniffer Virtual Machines Using VMware's Workstation Pro</title>
   <link href="http://4a616d6573.com//2017/09/17/configuring-simple-sniffer-virtual-virtual-machines-using-vmwares-workstation-pro/"/>
   <updated>2017-09-17T00:00:00+00:00</updated>
   <id>http://4a616d6573.com//2017/09/17/configuring-simple-sniffer-virtual-virtual-machines-using-vmwares-workstation-pro</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;This post will show you how to create a victim and sniffer virtual machine pair which you can use to analyse malware or general application network traffic. This post was mainly inspired by &lt;a href=&quot;https://securedorg.github.io/RE101/&quot;&gt;Malware Unicorn’s Reverse Engineering 101&lt;/a&gt; which provides one of the best introductions to malware reverse engineering.&lt;/p&gt;

&lt;p&gt;I did have a few issues importing and configuring the Virtual Box images into VMware’s Workstation Pro, so I deployed the configuration from scratch using Workstation Pro as the base. I also had trouble finding a central guide on how to configure INetSim and Wireshark, so I figured I’d make a post not only as a reference for myself but to aid others in configuring this setup.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;required-components&quot;&gt;Required Components&lt;/h2&gt;

&lt;p&gt;Below are the recommended components:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vmware.com/au/products/workstation.html&quot;&gt;VMware Workstation Pro&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Ubuntu 16.4 Virtual Machine&lt;/li&gt;
  &lt;li&gt;Windows 7 Virtual Machine (Windows XP or Windows 10 can also be used)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.inetsim.org/&quot;&gt;INetSim&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.wireshark.org/&quot;&gt;Wireshark&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;virtual-machine-setup&quot;&gt;Virtual Machine Setup&lt;/h2&gt;

&lt;p&gt;Firstly deploy your virtual machines and name appropriately, I currently use Workstations &lt;a href=&quot;https://www.vmware.com/support/ws4/doc/preserve_snapshot_ws.html&quot;&gt;Snapshots&lt;/a&gt; to preserve various virtual machine configurations, this saves me from having multiple deployments of the same OS and also reduces disk space. Make sure you at least have a “Vanilla” snapshot before beginning incase anything goes wrong. I recommend that both virtual machines have at least 2GB of RAM and 2 Processors, this can be changed under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Edit virtual machine settings&lt;/code&gt; by changing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Memory&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Processors&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;virtual-network-configuration&quot;&gt;Virtual Network Configuration&lt;/h3&gt;

&lt;p&gt;Next you will need to configure a network for your victim and sniffer  to run in.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Open the Virtual Network Editor in VMware Workstation by selecting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Edit&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Virtual Network Editor&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Change Settings&lt;/code&gt; and enter your credentials if required.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Add Network&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Choose a network to add, I usually select the last available network &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMnet19&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Once the network has been configured confirm that the network is using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Host-only&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can change the subnet to suit your needs but for this post I will leave it as the ‘default’ configuration which is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.150.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Do not assign this network to your victim and sniffer machines until you have configured INetSim and Wireshark.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;ubuntu-configuration&quot;&gt;Ubuntu Configuration&lt;/h2&gt;

&lt;p&gt;Once you have a “Vanilla” snapshot you can launch Ubuntu, this will be used as the Sniffer and will require INetSim and Wireshark to be installed.&lt;/p&gt;

&lt;h3 id=&quot;inetsim&quot;&gt;INetSim&lt;/h3&gt;

&lt;p&gt;INetSim is a tool that simulates common internet services in a lab environment and is mainly used to analyse network behavior, this provides additional benefits such as allowing execution in an isolated environment while allowing malware samples to make “real” communications to the internet that can lead to retrieval of important indicators.&lt;/p&gt;

&lt;p&gt;Setting up INetSim isn’t too difficult but some of the information to set it up correctly is spread out over multiple sites.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Terminal&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo -i&lt;/code&gt; and type in your virtual machines password to launch as root and make this process a little quicker.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;echo &quot;deb http://www.inetsim.org/debian/ binary/&quot; &amp;gt; /etc/apt/sources.list.d/inetsim.list&lt;/code&gt; to add the Debian Archive repository for INetSim to your sources list.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wget -O - http://www.inetsim.org/inetsim-archive-signing-key.asc | apt-key add -&lt;/code&gt; to add the Signing Key to your trusted keys.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt update&lt;/code&gt; to issue an update to your cache of available packages.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt install inetsim -y&lt;/code&gt; to install INetSim.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once this is done you have installed INetSim, however you will need to do some more configuration to get it operational.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nano /etc/default/inetsim&lt;/code&gt; and set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ENABLED&lt;/code&gt; from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1&lt;/code&gt;, use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; to exit and type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y or yes&lt;/code&gt; to save your changes. This will set INetSim to launch on boot.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nano /etc/inetsim/inetsim.conf&lt;/code&gt; to open the configuration file.&lt;/li&gt;
  &lt;li&gt;Set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;service_bind_address&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XXX.XXX.XXX.1&lt;/code&gt; of your subnet, in this case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.150.1&lt;/code&gt; and delete the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#&lt;/code&gt;, this will act as the internet gateway for your victim virtual machine.&lt;/li&gt;
  &lt;li&gt;Set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dns_default_ip&lt;/code&gt; to the same address as your gateway, remember to delete the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#&lt;/code&gt; and save the configuration.&lt;/li&gt;
  &lt;li&gt;Start INetSim by entering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;service inetsim start&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Check that INetSim is running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;service inetsim status&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Ensure the correct services are running by entering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ps -ef | grep inetsim&lt;/code&gt;. You should see a list of services such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;inetsim 4404 4394 0 17:59 ? 00:00:00 inetsim_ftp_21_tcp&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You have now setup INetSim.&lt;/p&gt;

&lt;h2 id=&quot;wireshark&quot;&gt;Wireshark&lt;/h2&gt;

&lt;p&gt;Wireshark is an amazing tool for capturing network traffic that can then be analysed to determine where malware is communicating, it can also be used to troubleshoot a broad variety of network issues.&lt;/p&gt;

&lt;p&gt;Yet again Wireshark is “easy” to install but the instructions are outlined here for the sake of completion.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Terminal&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo -i&lt;/code&gt; and type in your virtual machines password.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo add-apt-repository ppa:wireshark-dev/stable -y&lt;/code&gt; to add the repository.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get update&lt;/code&gt; to update your available packages.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install wireshark -y&lt;/code&gt; to install Wireshark.&lt;/li&gt;
  &lt;li&gt;When prompted with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;configuring wireshark-common&lt;/code&gt; window select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Yes&lt;/code&gt;, this will allow non-super users to capture packets.&lt;/li&gt;
  &lt;li&gt;Exit the root account by entering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit&lt;/code&gt;, this is so you assigned the correct user to the wireshark group.&lt;/li&gt;
  &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo adduser $USER wireshark&lt;/code&gt;, this will add the terminal user to the wireshark group.&lt;/li&gt;
  &lt;li&gt;Test that you can launch Wireshark by entering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo wireshark&lt;/code&gt;, you will see an error message relating to running the application as a super-user but this shouldn’t effect functionality.&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;final-configurations&quot;&gt;Final Configurations&lt;/h2&gt;

&lt;p&gt;Once you have configured your virtual machines, custom network, installed and configured INetSim and Wireshark you will need to complete a few final steps.&lt;/p&gt;

&lt;h3 id=&quot;virtual-machine-virtual-network&quot;&gt;Virtual Machine Virtual Network&lt;/h3&gt;

&lt;p&gt;Set your victim and sniffer to the network you configured. This can be done by performing the following on each virtual machine.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VM&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Settings&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network Adapter&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Check &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Custom: Specific virtual network&lt;/code&gt; under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network connection&lt;/code&gt; and choose your network, in this case it’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMnet19&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;set-ubuntu-static-ip-address&quot;&gt;Set Ubuntu Static IP Address&lt;/h3&gt;

&lt;p&gt;Since your Ubuntu machine is acting as your internet gateway you’ll want to give it a static IP.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Options&lt;/code&gt; for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Wired&lt;/code&gt; connection.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IPv4 Settings&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Method&lt;/code&gt; select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Manual&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Add&lt;/code&gt; and enter your address from before in this case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.150.1&lt;/code&gt;, use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tab&lt;/code&gt; to switch to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Netmask&lt;/code&gt;, leave this as default &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tab&lt;/code&gt; again to switch to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gateway&lt;/code&gt; then entre the same number as before.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Save&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disable and re-enable the network interface to update to your changes, confirm you address is correct by using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ifconfig&lt;/code&gt; and checking the IP under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ens33&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;set-windows-domain-name-system&quot;&gt;Set Windows Domain Name System&lt;/h3&gt;

&lt;p&gt;Once you have configured your Ubuntu machine to have a static IP you need to configure your Windows machines DNS so it knows to use the Ubuntu machine as it’s reference to the ‘internet’.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Open the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Start Menu&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Control Panel&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network and Internet&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network and Sharing Center&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Change adapter settings&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Right click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Local Area Connection&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Properties&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Internet Protocol Version 4 (TCP/IPv4)&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Properties&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Check &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Use the following DNS Server Addresses&lt;/code&gt; and enter the static IP of your Ubuntu machine in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Preferred DNS server&lt;/code&gt; in this case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.150.1&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OK&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Alternatively this can also be achieved by entering the following in an elevated Command Prompt &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;netsh interface ip add dns name=&quot;Local Area Connection&quot; addr=192.168.150.1 index=1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once this is done you can move onto testing.&lt;/p&gt;

&lt;h3 id=&quot;testing&quot;&gt;Testing&lt;/h3&gt;

&lt;p&gt;Finally to test this setup.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Launch both virtual machines, usually I launch the Ubuntu machine first and allow it to load before launching the victim.&lt;/li&gt;
  &lt;li&gt;Once Ubuntu has loaded check that INetSim is running correctly with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ps -ef | grep inetsim&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Wireshark&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select the interface &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ens33&lt;/code&gt; and start capturing by selecting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Capture&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Start&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;In the Windows 7 machine ping the Ubuntu machine, if everything is configured correctly you should see ‘ICMP’ packets in the Wireshark capture trail.&lt;/li&gt;
  &lt;li&gt;Open Internet Explorer and browse to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;www.google.com&lt;/code&gt;, the page should load and return the following in HTML ‘This is the default HTML page for INetSim HTTP server fake mode.’&lt;/li&gt;
  &lt;li&gt;Confirm you can download fake files, enter a URL with an .exe included such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;www.evil.com/malware.exe&lt;/code&gt;. You should be promoted with a download window, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Save&lt;/code&gt; and confirm that malware.exe is download.&lt;/li&gt;
  &lt;li&gt;Confirm you can open the downloaded executable, you should see the message prompt &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;This is the INetSim default binary&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You now have a fully functioning basic sniffer setup, just remember to snapshot your finished configurations so you can restore them after use.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;/h2&gt;

&lt;p&gt;You’re now free to detonate malware samples with relative safety while having the added benefit of simulating internet connectivity. I’m thinking the next post will be about what to deploy to a victim or malware analysis machine as well as what you should run and capture while analysing samples.&lt;/p&gt;

&lt;p&gt;I hope you found this post informative. If you have any questions, noticed inaccurate information or spelling mistakes in this post you can contact me via the &lt;a href=&quot;/about/&quot;&gt;About&lt;/a&gt; section.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;tips&quot;&gt;Tips&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;If you’re using this setup from multiple machines, you will need to configure the same VMware Workstation network settings for each machines instance of VMware Workstation.&lt;/li&gt;
  &lt;li&gt;If you receive the message “Could not get lock /var/lib/dpkg/lock” or “E: Could not get lock /var/cache/apt/archives/lock” while trying to install an application you can clear it but deleting the “lock” folder using the following: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm /var/lib/dpkg/lock -r&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm /var/cache/apt/archives/lock -r&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;If you want to remove the super-user warning message when opening Wireshark, you can do so by editing Wireshark’s init.lua file by entering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano /usr/share/wireshark/init.lua&lt;/code&gt; and setting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;disable_lua&lt;/code&gt; from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;false&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;&amp;quot;https://securedorg.github.io/RE101/&quot;&gt;https://securedorg.github.io/RE101/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vmware.com/au/products/workstation.html&quot;&gt;https://www.vmware.com/au/products/workstation.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vmware.com/au/products/workstation.html&quot;&gt;http://www.inetsim.org/packages.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.wireshark.org/&quot;&gt;https://www.wireshark.org/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vmware.com/support/ws4/doc/preserve_snapshot_ws.html&quot;&gt;https://www.vmware.com/support/ws4/doc/preserve_snapshot_ws.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://techanarchy.net/2013/08/installing-and-configuring-inetsim/&quot;&gt;https://techanarchy.net/2013/08/installing-and-configuring-inetsim/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://askubuntu.com/questions/700712/how-to-install-wireshark&quot;&gt;https://askubuntu.com/questions/700712/how-to-install-wireshark&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://askubuntu.com/questions/454734/running-wireshark-lua-error-during-loading&quot;&gt;https://askubuntu.com/questions/454734/running-wireshark-lua-error-during-loading&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://superuser.com/questions/204046/how-can-i-set-my-dns-settings-using-the-command-prompt-or-ps&quot;&gt;https://superuser.com/questions/204046/how-can-i-set-my-dns-settings-using-the-command-prompt-or-ps&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;
</content>
 </entry>
 
 <entry>
   <title>Track Log Sources Using Windows Events</title>
   <link href="http://4a616d6573.com//2017/06/08/track-log-sources-using-windows-events/"/>
   <updated>2017-06-08T00:00:00+00:00</updated>
   <id>http://4a616d6573.com//2017/06/08/track-log-sources-using-windows-events</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;This post will show you how to alert or report on the creation and deletion of computer accounts within an environment by utilising &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/desktop/aa964766.aspx&quot;&gt;Windows Events&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;use-case&quot;&gt;Use Case&lt;/h2&gt;

&lt;p&gt;While most System Information and Event Management (SIEM) software today offers automatic detection and integration of log sources, it can be useful to have a secondary process in place to keep it in check or just have an analysts eyes cover the events to gain a better understanding of what exists within the environment.&lt;/p&gt;

&lt;p&gt;Alternatively you may have processes in place to notify you when new endpoints and servers are added or removed in a network but again having a secondary process in place might be useful.&lt;/p&gt;

&lt;p&gt;The proverb “Trust, but verify” defines this process nicely.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;required-components&quot;&gt;Required Components&lt;/h2&gt;

&lt;p&gt;Below are the recommended components to integrate this use case:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Domain Controller(s) (Configured with Active Directory Users and Computers)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4741&quot;&gt;Windows Security Event 4741 (A computer account was created)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4743&quot;&gt;Windows Security Event 4743 (A computer account was deleted)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have devices that are pre Windows 2003 use the following Windows Events:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=645&quot;&gt;Windows Security Event 645 (Computer Account Created)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=647&quot;&gt;Windows Security Event 647 (Computer Account Deleted)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;/h2&gt;

&lt;p&gt;Setup is really quite easy, using your tool of choice create a query or alert that will detect the above security events.&lt;/p&gt;

&lt;p&gt;This can easily be done by monitoring for the Windows Event IDs &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4741&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4743&lt;/code&gt; and summarising by the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Account Name&lt;/code&gt; field under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;New Computer Account&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Target Computer&lt;/code&gt; sections.&lt;/p&gt;

&lt;p&gt;You can then output that query to an alert or report.&lt;/p&gt;

&lt;p&gt;Here are some basic Splunk searches:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source=&quot;WinEventLog:Security&quot; &quot;EventCode=4741&quot; | eval Account_Name=mvindex(Account_Name, -1) | top Account_Name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source=&quot;WinEventLog:Security&quot; &quot;EventCode=4743&quot; | eval Account_Name=mvindex(Account_Name, -1) | top Account_Name&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The section &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eval Account_Name=mvindex(Account_Name, -1)&lt;/code&gt; is used to ignore the first extracted value under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Account_Name&lt;/code&gt; because it will always be the creator of the computer account.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have two reports setup to run weekly to provide a summary of all computers accounts created and all computers accounts deleted in an environment from the previous week.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;considerations&quot;&gt;Considerations&lt;/h2&gt;

&lt;p&gt;These events can occur multiple times per creation or removal so either use the report to provide you a summary or apply a threshold to your alert if possible.&lt;/p&gt;

&lt;p&gt;You may only need to track log sources of a certain type i.e. Windows Server, so attempt to filter out all unwanted results.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;/h2&gt;

&lt;p&gt;Knowing what is in your environment is extremely important, hopefully this post can help you achieve better visibility in your network or at least provide you with a secondary process for comparison purposes.&lt;/p&gt;

&lt;p&gt;I hope you found this post informative. If you have any questions you can contact me via the &lt;a href=&quot;/about/&quot;&gt;About&lt;/a&gt; section.&lt;/p&gt;

&lt;hr /&gt;
</content>
 </entry>
 
 <entry>
   <title>Building A Portable Lab</title>
   <link href="http://4a616d6573.com//2017/04/01/building-a-portable-lab/"/>
   <updated>2017-04-01T00:00:00+00:00</updated>
   <id>http://4a616d6573.com//2017/04/01/building-a-portable-lab</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;This post will show you how to setup a portable lab that can house all your day to day security tools.&lt;/p&gt;

&lt;p&gt;For quite a while I maintained two labs, one for work and one for home. Both had sets of tools that would expand apart from one another and after a while it became too cumbersome.&lt;/p&gt;

&lt;p&gt;I had the bright spark idea loading a Windows XP virtual machine onto a USB drive and attempting to run it. It works but as soon as you do anything that required the transfer for data. The virtual machine ground to halt, as expected.&lt;/p&gt;

&lt;p&gt;I wondered if results would be better with a Solid State Drive (SSD) and E-Sata or USB 3.0.&lt;/p&gt;

&lt;p&gt;A co-worker finally pulled the trigger on the idea and turns out it works well so I decided to build my own.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;required-components&quot;&gt;Required Components&lt;/h2&gt;

&lt;p&gt;Here are the recommended parts for a basic portable lab.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Solid State Drive&lt;/li&gt;
  &lt;li&gt;Sata to USB 3.0 Adapter/E-Sata&lt;/li&gt;
  &lt;li&gt;Protect Drive Case&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For my build I used the following components, these cost a total of $156 AUD.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Samsung 850 Evo 250GB = $120&lt;/li&gt;
  &lt;li&gt;StarTech USB 3.0 to 2.5” SATA HDD Adapter Cable = $26&lt;/li&gt;
  &lt;li&gt;J. Burrows Portable Hard Drive Case Black = $10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would recommend getting a 500GB+ capacity hard drive. At the time of writing this I have only 83GB free.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;/h2&gt;

&lt;p&gt;Once you’ve pulled apart all the packaging and assembled the portable lab you can get down to the fun stuff.&lt;/p&gt;

&lt;h3 id=&quot;encryption&quot;&gt;Encryption&lt;/h3&gt;

&lt;p&gt;Having a lab that is portable increase it’s risk profile, it’s much more prone to loss or theft. So you should consider deploying the same protections to it as you would a workstation.&lt;/p&gt;

&lt;p&gt;Generally I would tell you not to keep anything confidential on a portable lab. My lab only has free tools, virtual machines and a few malware samples. So I could go without encryption but that would be against best practice.&lt;/p&gt;

&lt;h4 id=&quot;verycrypt&quot;&gt;VeryCrypt&lt;/h4&gt;

&lt;p&gt;The tool I decided to use was &lt;a href=&quot;https://veracrypt.codeplex.com/&quot;&gt;VeraCrypt&lt;/a&gt;. I attempted to use BitLocker-To-Go but it turned out to have incompatibility issues.&lt;/p&gt;

&lt;p&gt;VeraCrypt offers a &lt;a href=&quot;https://veracrypt.codeplex.com/wikipage?title=Portable%20Mode&quot;&gt;Portable Mode&lt;/a&gt;. This allows you to run the executable without installation.&lt;/p&gt;

&lt;h3 id=&quot;partitioning&quot;&gt;Partitioning&lt;/h3&gt;

&lt;p&gt;To keep things simple I decided to create two partitions on the SSD.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Public NTFS Volume (1GB)&lt;/li&gt;
  &lt;li&gt;Private NTFS VeraCrypt volume (231GB)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows you to house the portable tools needed to mount the drive. You don’t have to worry about having them available on any machines you decide to use the lab on.&lt;/p&gt;

&lt;p&gt;Partitioning can all done via &lt;a href=&quot;https://support.microsoft.com/en-us/help/17418/windows-7-create-format-hard-disk-partition&quot;&gt;Disk Management&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;encrypting&quot;&gt;Encrypting&lt;/h3&gt;

&lt;p&gt;Once partitioned you can move to encrypting your drive. I installed VeraCrypt using the ‘Extract’ method as I won’t be needing it on my workstations.&lt;/p&gt;

&lt;p&gt;Follow the below steps to encrypt your partition.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create Volume&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Encrypt a non-system partition/drive&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Leave radio button checked on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Standard VeryCrypt Volume&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Device&lt;/code&gt; and select your partition.&lt;/li&gt;
  &lt;li&gt;Leave radio button checked on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create encrypted volume and format it&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Leave &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AES&lt;/code&gt; selected under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Encryption Algorithm&lt;/code&gt;, under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hash Algorithm&lt;/code&gt; select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SHA-256&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Confirm your volume size.&lt;/li&gt;
  &lt;li&gt;Input your password, be sure to store it somewhere safe.&lt;/li&gt;
  &lt;li&gt;Optional, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Use keyfiles&lt;/code&gt; and select a keyfile on your choosing.&lt;/li&gt;
  &lt;li&gt;Under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Options&lt;/code&gt; change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Filesystem&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NTFS&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Generate a random pool by moving your mouse and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Format&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Encrypting can take quite a while, around 1-4 hours depending on your system.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;traveler-disk-setup&quot;&gt;Traveler Disk Setup&lt;/h2&gt;

&lt;p&gt;Once your volume is encrypted you can deploy VeraCrypt’s &lt;a href=&quot;https://veracrypt.codeplex.com/wikipage?title=Portable%20Mode&quot;&gt;Traveler Disk&lt;/a&gt; to your public NTFS partition with the following instructions.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools&lt;/code&gt; and then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Traveler Disk Setup&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Browse&lt;/code&gt; and select your partition.&lt;/li&gt;
  &lt;li&gt;Optional, adjust &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AutoRun Configuration&lt;/code&gt; settings to your requirements.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will deploy a lighter version of VeraCrypt to your public volume.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;mounting&quot;&gt;Mounting&lt;/h2&gt;

&lt;p&gt;Once encrypted and your portable files loaded. You can mount the partition with the following instructions.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Plug in your portable drive.&lt;/li&gt;
  &lt;li&gt;Execute &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VeraCrypt.exe&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Select which drive letter you want to mount your lab on.&lt;/li&gt;
  &lt;li&gt;Under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Volume&lt;/code&gt; select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Select Device&lt;/code&gt; and select your encrypted partition.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mount&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Enter your password.&lt;/li&gt;
  &lt;li&gt;Optional, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mount Options&lt;/code&gt; and adjust settings to your requirements.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OK&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Wait for your volume to mount, this can take a few minutes.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;/h2&gt;

&lt;p&gt;Congratulations! You’ve now got a portable lab, you can now begin moving over all your tools.&lt;/p&gt;

&lt;p&gt;I’ve found a portable lab to be an indispensable tool for my day to day work. Being able to have a ever changing tool set on hands at all times is a real game changer. Best of all your spend more time doing the interesting stuff and less on maintenance.&lt;/p&gt;

&lt;p&gt;I hope you found this post informative. If you have any questions you can contact me via the &lt;a href=&quot;/about/&quot;&gt;About&lt;/a&gt; section.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;tips&quot;&gt;Tips&lt;/h2&gt;

&lt;p&gt;Here are some general tips I’ve come across after using a portable lab.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;If you have issues mounting the drive. Check &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mount volume and removal able medium&lt;/code&gt; under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mount Options&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Always be sure to use VeraCrypt to dismount your drives when finished.&lt;/li&gt;
  &lt;li&gt;You might use tools that get flagged as malicious. Putting them in a password protected zip file fixes this issue.&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Why?</title>
   <link href="http://4a616d6573.com//2017/03/18/why/"/>
   <updated>2017-03-18T00:00:00+00:00</updated>
   <id>http://4a616d6573.com//2017/03/18/why</id>
   <content type="html">&lt;p&gt;Why? What is this for?&lt;/p&gt;

&lt;p&gt;To quote Cave Johnson from Valves &lt;a href=&quot;http://store.steampowered.com/app/620/&quot;&gt;Portal 2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;“Science isn’t about why, it’s about why not!”&lt;/p&gt;

&lt;p&gt;I spend a good part of my work day reading other peoples security blogs. I gain a huge amount of knowledge through doing so. I figure why can’t I can contribute and help others learn as well?&lt;/p&gt;

&lt;p&gt;Every once in a while I could come up with something decent.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I gained inspiration from &lt;a href=&quot;http://malware-traffic-analysis.net/&quot;&gt;www.malware-traffic-analysis.net&lt;/a&gt; by &lt;a href=&quot;https://twitter.com/malware_traffic&quot;&gt;“Brad Duncan”&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Malware Traffic Analysis provides great write ups on malware campaigns. This site helped me understand &lt;a href=&quot;https://blog.malwarebytes.com/threat-analysis/2014/10/exposing-the-flash-eitest-malware-campaign/&quot;&gt;EI Test&lt;/a&gt; and &lt;a href=&quot;https://blog.malwarebytes.com/cybercrime/exploits/2016/09/rig-exploit-kit-takes-on-large-malvertising-campaign/&quot;&gt;Rig-EK&lt;/a&gt; which was very useful at the time I came across it.&lt;/p&gt;

&lt;p&gt;Since that day I have had Malware Traffic Analysis as part of my daily news digest. It continues to provide great information on current trends.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;My goal for this site is the attempt Malware Traffic Analysis investigations. I will also throw up some other posts when I come across anything interesting.&lt;/p&gt;

&lt;p&gt;I aim to publish at least one post a &lt;del&gt;week&lt;/del&gt; fortnight but that might vary depending on how busy I am :).&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;You can find out more about me and what is used to build this site in the &lt;a href=&quot;/about/&quot;&gt;About&lt;/a&gt; section.&lt;/p&gt;
</content>
 </entry>
 

</feed>
