This blog is NOT OFFICIAL website of Kali Linux. We just share Tutorials to learn Cybersecurity.

Legion -- Test Web Application Vulnerability Automatically

Legion is an Open-Source and easy to use python based GUI tool that can helps in network penetration testing. Legion is a upgraded version of Sparta. Previously Sparta comes pre-installed with Kali Linux, Now Kali removed Sparta because of it's older Python version(Python2).

Legion kali linux tutorial

Legion is very similar to Sparta. This semi-automated network penetration testing framework comes installed with Kali Linux.
The main features of Legion:
  • Automatic recon and scanning with NMAP, whataweb, nikto, Vulners, Hydra, SMBenum, dirbuster, sslyzer, webslayer and more (with almost 100 auto-scheduled scripts).
  • Easy to use graphical interface with rich context menus and panels that allow pentesters to quickly find and exploit attack vectors on hosts.
  • Modular functionality allows users to easily customize Legion and automatically call their own scripts/tools.
  • Highly customizable stage scanning for ninja-like IPS evasion.
  • Automatic detection of CPEs (Common Platform Enumeration) and CVEs (Common Vulnerabilities and Exposures).
  • Ties CVEs to Exploits as detailed in Exploit-Database.
  • Realtime autosaving of project results and tasks.
Let's start with installing Legion in our Kali Linux system. Usually it comes pre installed with Kali's new versions but, if we need to install it we can run following command:
sudo apt-get install legion -y
The following screenshot shows the installation process:
installing legion

Now we can run Legion's graphical interface by using following command:
Legion will open, as we can see in the following screenshot:
Legion main screen
Here in input section we have an option to add hosts (target IP or web address). When we click on it we got following window like the screenshot:
adding hosts on legion
Here we can add single or multiple host(s) for scanning. We can add a single IP, range of IPs or host names in the section. To add multiple target we need to separate them with semicolon.

Then we need to choose the 'Mode Selection', Easy or Hard.
For this example we choose 'Hard', in the 'Easy Mode' we got the nmap scanning option. Here we turn on the nmap host discovery and staged scan.

In the 'Timing and Performance Options' if we choose a higher performance option takes more time in compared to lower performance options.

In 'Hard Mode' we get additional customizing options like custom port scanning, host discovery, and custom discovery options.

For this tutorial we have selected a IP with custom scanning & host discovery. In the additional arguments we are using -sV and -O options. -sV flag is used for service version and -O flag is for OS detection.
testing using legion
Then we just need to click on "Submit". Legion will do the rest. First it will scan the IP or web address with nmap then it run Nikto on the targeted IP or web address. Legion will test with various tools automated like Shodan, whataweb, Vulners, Hydra, SMBenum, dirbuster, sslyzer, webslayer and more (with almost 100 auto-scheduled scripts).

We got a Tab on Legion for every tool used and it is also able to find CVE. It will show us the CVE if available. So this Legion is GUI based very easy tool for every penetration tester.
security testing using legion
Legion scans using nikto after completing nmap scan
Legion is a good tool for penetration testing. Using this we can do some automatic scanning and find vulnerabilities on web applications.

For more tutorials like this follow our website to get e-mail notification of our recent updates. We also update our tutorials on our social media as Twitter & Medium.
Kali Linux


No comments
Post a Comment