Emulate Cisco ASA 8.4.2 on GNS3 1.3

This guide is no longer my recommended way of running an ASA in GNS3. I recommend signing up for Cisco VIRL and running the virtual appliances in the new GNS3 using VMWare Workstation.

This post will take you through a step-by-step guide to emulate Cisco ASA 8.4.2 on GNS3. In GNS3, QEMU is an emulator which emulates the hardware environment for a Cisco ASA device. Please make sure that your computer has at least 4GB of RAM before you begin.

1.) Download and install GNS3. You can get the software from http://www.gns3.com . You may need to register/login to get the software.

2.) Get a copy of ASA 8.4.2 code. You can get it from your live ASA device by copying the image to a TFTP server. (or download from https://drive.google.com/folderview?id=0BxGGwKJEWVB0dzd5aFMzTjRNcDg&usp=sharing)

3.) Download asa842-initrd.gz and asa842-vmlinuz

4.) Now Open GNS3 and go to Edit -> Preferences -> Qemu -> Qemu VMs

5.) Click New and type a name of your ASA device

6.) Select the type as ASA 8.4(2) and click Next

7.) Leave the Qemu binary and RAM as it is and click Next

8.) Now browse the initrd and Kernal image which you downloaded and click Finish

9.) Last thing you need to do is add a few more interfaces by clicking Edit -> Network and change adapters from 4 to 6

10.) Click OK and OK again

11.) Now in the main GNs3 window click the Browse Security Device and drag your new ASA into the workspace.

asa2

Add ASDM and connect your ASA

You can connect ASA from the computer from which you are running GNS3. Follow the steps below to do this:

1.) Add a Loop-back to your computer (http://websistent.com/how-to-connect-gns3-to-the-internet/)

2.) Drag and drop ‘Cloud’ to the GNS3 work-space and connect it with an Ethernet Switch. Refer below screenshot: (also ping the cloud tap0 interface)

asdm

3.) Configure ‘Cloud’ and add the Loop-back adapter which you have added in step 1, see below figure:

cloudasa

4.) Open a console session to your ASA from GNS3 and configure one of its interface like below:

interface GigabitEthernet1
 nameif inside
 security-level 100
 ip address 192.168.1.10 255.255.255.0

5.) Now try to ping your computers Loopback IP from the ASA and vice-verse (Make sure that you disable firewall/antivirus etc on your local PC which is installed with GNS3.)

6.) Download ASDM ( asdm-649.bin) from https://drive.google.com/file/d/0BxGGwKJEWVB0amstM0VQVmRYNUk/view?usp=sharing

7.) Install a TFTP server in your local PC and keep the above file in its root directory.

8.) Now upload the asdm-649.bin to the ASA flash using the below commands: (If the upload fails , then try disabling any other network adapter other than the Loop-back adapter temporarily and try)

ciscoasa# copy tftp: flash:
Address or name of remote host? 192.168.1.100
Source filename? asdm-649.bin
Destination filename [asdm-649.bin]?

Accessing tftp://192.168.1.100/asdm-649.bin…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18927088 bytes copied in 143.10 secs (132357 bytes/sec)

9.) Initiate the below commands to load ASDM on the ASA and enable http server:

ciscoasa(config)# asdm image flash:asdm-649.bin
ciscoasa(config)# http server enable
ciscoasa(config)# http 192.168.1.10 255.255.255.0 inside
ciscoasa(config)# username admin password 1234 privilege 15

ciscoasa(config)# write memory

10.) Now at your local PC, open a browser and type https://192.168.1.10 and the ASDM page will open:

11.) Click on ‘Run ASDM’ and enter with the username and password which you have created on step 9. You will be presented with the ASA dashboard.

Install Ansible Centos 7

Ansible will not install without the proper packages. It is part of the Extra Packages for Enterprise Linux (EPEL) repository so you need to install epel-release package firs.

$ sudo yum install epel-release

The repo should now be visible in the repo list

$ sudo yum repolist

So now you can go ahead and install ansible

$ sudo yum install ansible

Empire

Empire is a pure PowerShell post-exploitation agent built on cryptologically-secure communications and a flexible architecture. Empire implements the ability to run PowerShell agents without needing powershell.exe, rapidly deployable post-exploitation modules ranging from key loggers to Mimikatz, and adaptable communications to evade network detection, all wrapped up in a usability-focused framework. It premiered at BSidesLV in 2015.

https://www.powershellempire.com/

 

theHarvester

theHarvester is a tool for gathering e-mail accounts, subdomain names, virtual
hosts, open ports/ banners, and employee names from different public sources
(search engines, pgp key servers).

The tool is very simple to run and is an excellent place to start for the early stages of a penetration test or just to know the visibility of your company on the Internet. The tool is pre installed with Kali Linux or you can download the python script from github below.

https://github.com/laramies/theHarvester

— Fire up Kali and open a terminal window —

type theharvester to view options and examples

root@kali:~#  theharvester

theharvester

— copy and paste one of the examples to get some sample output —

root@kali:~# theharvester -d Microsoft.com -b google

you should see theharvester load and run its scripts.

theharvester1

– Next step would be to go ahead and run these against your target company to begin your penetration testing –

Other search examples:

root@kali:~# theharvester –d yourtarget.com –b google

root@kali:~# theharvester –d yourtarget.com –b bing

root@kali:~# theharvester –d yourtarget.com –b linkedin

 

 

 

 

 

How to Setup NTP service CentOS 7

Presentation

NTP (Network Time Protocol) is a protocol to keep servers time synchronized: one or several master servers provide time to client servers that can themselves provide time to other client servers (notion of stratus).

Two main packages are used in CentOS 7 to set up the client side:

  • ntp: this is the classic package

Prerequisites

Before anything else, you need to assign the correct time zone.
To get the current configuration, type:

# timedatectl
Local time: Sat 2015-11-07 08:17:33 EST
Universal time: Sat 2015-11-07 13:17:33 UTC
RTC time: Sat 2015-11-07 13:17:33
Timezone: America/New_York (EST, -0500)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2015-11-01 01:59:59 EDT
Sun 2015-11-01 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2016-03-13 01:59:59 EST
Sun 2016-03-13 03:00:00 EDT

To get the list of all the available time zones, type:

# timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
...
America/La_Paz
America/Lima
America/Los_Angeles
...
Asia/Seoul
Asia/Shanghai
Asia/Singapore
...
Pacific/Tongatapu
Pacific/Wake
Pacific/Wallis

Finally, to set a specific time zone (here America/New_York), type:

# timedatectl set-timezone America/New_York

Then, to check your new configuration, type:

# timedatectl
      Local time: Sat 2015-11-07 05:32:43 PST
  Universal time: Sat 2015-11-07 13:32:43 UTC
        RTC time: Sat 2015-11-07 13:32:43
        Timezone: America/New_York (EST, -0500)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2015-11-01 01:59:59 PDT
                  Sun 2015-11-01 01:00:00 PST
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2016-03-13 01:59:59 PST
                  Sun 2016-03-13 03:00:00 PDT

The NTP Package

Install the NTP package:

# yum install -y ntp

Activate the NTP service at boot:

# systemctl enable ntpd

Start the NTP service:

# systemctl start ntpd

The NTP configuration is in the /etc/ntp.conf file:

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 
restrict ::1

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys

Note: For basic configuration purpose, only the server directives could need a change to point at a different set of master time servers than the defaults specified.

To get some information about the time synchronization process, type:

# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+4.144.155.104.b 198.82.247.71    3 u   25   64  377   42.317    5.986   3.835
-ntp1.wiktel.com 210.176.201.94   2 u   24   64  357   65.948   -3.148   3.447
+blue.1e400.net  211.172.242.174  3 u   31   64  377   11.321   -1.323   7.003
*108.61.194.85   200.23.51.102    2 u   26   64  377   94.698    9.829   5.254

Alternatively, to get a basic report, type:

# ntpstat
synchronised to NTP server (129.250.35.251) at stratum 3
time correct to within 60 ms
polling server every 64 s

To quickly synchronize a server, type:

# systemctl stop ntpd
# ntpdate pool.ntp.org
 5 Jul 10:36:58 ntpdate[2190]: adjust time server 95.81.173.74 offset -0.005354 sec
# systemctl start ntpd