In this demo, we're going to get started with Low Orbit Ion Cannon.
In this introduction,
we'll start with an overview of the lab environment that
we're using in this course and then begin exploring the
LOIC graphical user interface.
This demo will prepare us for the rest of this course where we'll dive into
the practical application and attack our lab targets.
Let's head over to the lab and get started.
For this lab, I'm using five different virtual machines.
To make the environment easier to replicate,
I created a Vagrantfile that will enable you to quickly
create these bottom four machines here.
You can obtain the Kali Linux machine separately.
The Vagrantfile is found in the demo files for this course.
These machines are hosted in the Vagrant cloud and
are deployed using Vagrantfiles.
You'll need Vagrant and VirtualBox installed to use these.
Once you've installed Vagrant and VirtualBox,
you just need to make a few modifications to the
Vagrantfile to match your environment.
This Vagrantfile deploys a small network with two targets,
a host with LOIC installed,
and a machine acting as a router between your home network
and an internal LAN containing our targets.
To deploy each machine individually,
you add the hostname to the end of the vagrant up command.
Within the file, you need to modify the VM network section here.
Change the bridge value to reflect your local interface.
Next,
you need to modify these shell commands and configure this default
gateway to be your local LANs default gateway IP address.
This route delete removes the default gateway that Vagrant adds,
which forces all traffic to flow through the interfaces
we configured in the previous step.
You can also change this section to provide the
resources to the machines that you desire.
For my internal testing, all the settings in this Vagrantfile worked just fine.
I have the Ubuntu router set with an internal
interface IP address of 10.0.0.251.
For the Metasploitable machine,
this script sets the default gateway to that IP and
removes the route added by Vagrant,
forcing its traffic to flow through the Ubuntu Server.
I configure the Metasploitable 3 machine the same way.
The LOIC host is added to your home network and uses a
bridged interface like the Ubuntu router.
This host has a desktop interface and already has LOIC
installed along with the necessary tools to make it work
with a Linux operating system.
To deploy these machines,
simply navigate to the directory on your computer
and run the command vagrant up.
Vagrant will download the machines from the cloud,
install them on your system, and configure them according to the Vagrantfile.
The LOIC host is a large file since it has a desktop installed on it. If you
prefer to install LOIC on your local machine or an existing virtual machine,
there are instructions available on the GitHub Pages, and if you're using Kali
Linux, there's instructions available in the demo files. Installing this Kali
Linux machine is optional.
However, I'll be using it for the last two demos of this course.
I'm only using it to run LOIC, so if you want to follow along,
just install LOIC on any second machine and that will work just fine.
Once your lab is built, we need to make a couple of configuration
changes to ensure that traffic is routed properly.
Start by logging into your Ubuntu machine. To do that, you can just run
vagrant ssh ubuntu. The password for this machine is vagrant.
Once you're logged in, use ifconfig to get the IP address
of the external interface, which is enp0s8. In my case,
this IP address is 192.168.2.15.
Once you have the IP address, log into Host 1 from the
desktop. The password for this machine is also vagrant, as
it is with most Vagrant hosts.
Once you've logged in, open a terminal and add a route using the following
command, sudo route add ‑net 10.0.0.0 netmask 255.255.255.0.
And for a gateway, use the IP address you found in the previous step. In
my environment, I've already added this route, so this is just an
example. Your output should be a little different.
Once the route is added,
verify that you can ping the internal network by sending a ping to
10.0.0.100, which is our Metasploitable 2 host.
You can check the connectivity to Metasploitable 3 by
accessing 10.0.0.101 from your web browser.
If you arrive at this page and your pings were successful,
you can access the hosts and your lab is ready.
If you use the Vagrantfiles to deploy your lab, then your
LOIC host already has LOIC installed and the IRC programs
we'll use in later demos.
There are shortcuts for each of these on the desktop.
Let's go ahead and open LOIC. All right, we have our LOIC
interface and we're ready to start exploring the tool.
The LOIC interface is very intuitive, and each section is numbered in
the order that you enter the information before executing your attack.
By default, the interface is in manual mode where you control LOIC's
behavior. In this first section,
you enter either the URL or the IP address for your target
host and then select the Lock on button.
Once entered,
your selected target will appear in this section to
confirm. In the second section,
you determine the additional options used in your attack.
After selecting the timeout value,
you can add an HTTP subsite if you're using the HTTP protocol
or a custom message if using TCP or UDP.
You can also check these boxes to use Git or gZip if the selected protocol
supports it. In this next section, you can set a different port,
select your protocol, and determine the number of threads.
Decide whether to wait for a reply with each packet and
set the speed of your attack.
We'll go over these options in more detail in the next demo when we
run our first attack against one of our targets.
Once you set the selected options,
you push this button to start the attack. You can view the status
as it progresses in this bottom section here.
All right, we're ready to get started with the next demos where we'll run an
attack. For a quick recap, after completing this demo,
you should have a working lab environment with two potential targets.
You should have a host with LOIC installed and access to the interface.
You should be familiar with the LOIC interface and know
what each field is used to configure.