Skip to content

Posts from the ‘Uncategorized’ Category


Pip and virtualenv on Windows

Install pip

Pip (Python Package Installer), official documentation for pip.

Usually Python3 comes with pip preinstalled. If you get an error “pip command not found”, use the following command to install pip:

Download, make sure you’re saving file to Desktop

In your Command Prompt navigate to Desktop

cd Desktop



Now pip should work system wide.


In your Command Prompt enter:

pip install virtualenv

Launch virtualenv

In your Command Prompt navigate to your project:

cd your_project

Within your project:

virtualenv env

Activate your virtualenv:

on Windows, virtualenv creates a batch file


to activate virtualenv on Windows, activate script is in the Scripts folder :




Another way to install pip

Save the “” file to your desktop form

In your Command Prompt navigate to Desktop:

cd Desktop



install pip:

easy_install pip




Raincloud and umbrella


Ping Sweeps

Bash – on see live machines.

for i in `seq 1 255`; do ping -c 1 192.168.1.$i ; done
for i in `seq 1 255`; do ping -c 1 192.168.1.$i | tr \\n ' ' | awk '/1 packets received/ {print $2}' ; done

How to install XRDP on Ubuntu 16.04

Install XRDP on Ubuntu 16.04


xrdp is a great solution when you need to have coexistence between Windows machines and Linux machine.  xrdp is basically a piece of software that allows you to remote desktop into your Ubuntu machine from a Windows computer.  On the Windows machine, you do not need to install any tools, you simply use the standard and builtin tool Remote Desktop Connection.


Standard XRDP installation on Ubuntu 16.04


For this post, we have make some assumptions.

  • Ubuntu 16.04 (Final Release version) is used
  • The Mate-desktop will be installed on the machine (as alternative desktop environment)
  • We will configure our system to match on localized version (i.e. we are using a Belgian french keyboard)
  • Since Ubuntu 15.04, upstart has been replaced by systemd component. The systemd component is used in our scenario
  • No additional configuration is needed to reconnect to the same session if you are using the latest version of the xrdp package found in the Ubuntu Repository

Installation Process

Step 1 – Install XRDP Package from Ubuntu Repository

A standard installation for us means that we will be using the xrdp package available within the Ubuntu repository. To install the xrdp software from Ubuntu repository, you will need to issue the following command in a terminal.

sudo apt-get install xrdp

Because of the sudo command, you will be prompted for a password. After entering your password, you will be asked to confirm your action by pressing Y (see screenshot below)


Click on picture for better resolution

Step 2 – Install an alternative Desktop 

xrdp and Unity desktop (or Gnome 3) are not working well together.  If you do not install another desktop environment, when you will try to connect to your Ubuntu machine, you will see only a gray screen.  The workaround to this situation is to install an alternate desktop that can work with xrdp software solution.

Our preferred desktop alternative is Mate-Desktop.  This post will show you how to install the Mate-Desktop and have it working with the xrdp software solution.

To install the Mate-desktop, issue the following command from the Terminal Session

sudo apt-get update

sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

Note :

Desktop interface such as xfce, LXDE,LXQT, KDE  are all potential candidates.  Check the following links for more information and installation and configuration procedures


Step 3 – Configuring xRDP to use your desktop environment

At this stage, we need to configure our system in order to tell xrdp that an alternate desktop needs to be used.  In our case, we have to tell xrdp that we want to use Mate-Desktop as alternate desktop. With the previous version of Ubuntu, you would need to create the ~/.xsession file.  In Ubuntu 16.04, it seems that this approach is not working anymore.  We need to configure the system differently when working with Ubuntu 16.04

Starting the alternate desktop environment

Important Note : 

In our scenario, we have installed mate-desktop, If you have installed another Desktop alternative, you will have to adapt the configuration of the file to reflect your settings.

If you use the  ~/.xsession file approach, you will experience the same symptoms as before i.e. grey screen. We will need to configure the system in a different way.  To have xRDP working in Ubuntu 16.04, you will need to  update the /etc/xrdp/ file. To configure this, issue the following command in your Terminal console

sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/


Click on picture for better resolution

Note :

Remember that the command above is to be used when you have installed the Mate-Desktop.  If you have installed a different desktop environment, you will need to adapt the command accordingly. Please check the following links


Explore Machine learning by creating a custom network security tool ingesting only PCAP files and PCAP generated data.

As a network security analyst I have found myself in remote locations attempting to perform analysis on either to little useful data or to much ambiguous data. In either case, the customer still expects quick, fast, and quality results. My goal is to create a program that relies only on PCAP data and data that can be generated from PCAP files to make educated guesses on the “Goodness” and “Badness” of network traffic. This will include teaching the program using know Good and Bad examples.

To date, I am working on an outline for the program. I intend to make the program modular and I am thinking of using the network stack to communicate between the modules from the beginning to allow for modules to be moved from machine to machine as the load grows.

  • Input Module
    • PCAP data should be able to be read in line by line in the event that pcap is being written from live capture. It should also be able to be read in from whole files and should be able to accept tags for data labeling for known good and known bad.
    • Folder location and data group are created.
  • PCAP Processing Module
    • Made to be modular.
    • Run the raw PCAP data through each sub-module to create data.
      • Snort.
      • Bro
  • Data Sanitation Module
    • Turn the data from the PCAP Processing Module into data that can be used for machine learning.
    • Tag the data.
  • Machine Learning Module
    • This is where the real challenges will start. I am not this far yet in my studies.
  • Stored Data
    • Known GOOD
    • Known BAD

As I learn and being to write the program I will continue to post updates. I will be starting with Python as the base language because that is what I am familiar with but the project I am starting also requires R. I am also not going to limit the project to a single or several languages.



First blog post

This is your very first post. Click the Edit link to modify or delete it, or start a new post. If you like, use this post to tell readers why you started this blog and what you plan to do with it.