View Issue Details

IDProjectCategoryView StatusLast Update
0005642Kali LinuxTool Upgrade Requestpublic2020-12-01 10:48
ReporterGoVanguardMH Assigned Tosbrun  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionno change required 
Product Version2019.2 
Fixed in Version2020.1 
Summary0005642: Include Legion in place of or addition to Sparta
Description

We'd like to have our fork of Sparta added to the native Kali tools repo. Spoke with Steev and he asked that we open this bug report and assign it to Sophie.

https://github.com/govanguard/legion

NOTABLE CHANGES FROM SPARTA
Refactored from Python 2.7 to Python 3.6 and the elimination of depreciated and unmaintained libraries
Upgraded to PyQT5, increased responsiveness, less buggy, more intuitive GUI that includes features like:
Task completion estimates
1-Click scan lists of ips, hostnames and CIDR subnets
Ability to purge results, rescan hosts and delete hosts
Granual NMAP scanning options
Support for hostname resolution and scanning of vhosts/sni hosts
Revise process queuing and execution routines for increased app reliability and performance
Simplification of installation with dependency resolution and installation routines
Realtime project autosaving so in the event some goes wrong, you will not loose any progress!
Docker container deployment option
Supported by a highly active development team

Steps To Reproduce

N/A

Additional Information

PROJECT PAGE - https://govanguard.com/legion/
GITHUB - https://github.com/govanguard/legion
YOUTUBE - https://www.youtube.com/watch?v=7MoWs5RkZpo

READ ME

ABOUT
Legion, a fork of SECFORCE's Sparta, is an open source, easy-to-use, super-extensible and semi-automated network penetration testing framework that aids in discovery, reconnaissance and exploitation of information systems. Legion is developed and maintained by GoVanguard. More information about Legion, including the roadmap, can be found on it's project page at https://GoVanguard.io/legion.

FEATURES
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
NOTABLE CHANGES FROM SPARTA
Refactored from Python 2.7 to Python 3.6 and the elimination of depreciated and unmaintained libraries
Upgraded to PyQT5, increased responsiveness, less buggy, more intuitive GUI that includes features like:
Task completion estimates
1-Click scan lists of ips, hostnames and CIDR subnets
Ability to purge results, rescan hosts and delete hosts
Granual NMAP scanning options
Support for hostname resolution and scanning of vhosts/sni hosts
Revise process queuing and execution routines for increased app reliability and performance
Simplification of installation with dependency resolution and installation routines
Realtime project autosaving so in the event some goes wrong, you will not loose any progress!
Docker container deployment option
Supported by a highly active development team
GIF DEMO

INSTALLATION
It is preferable to use the docker image over a traditional installation. This is because of all the dependancy requirements and the complications that occur in environments which differ from a clean, non-default installation.

Supported Distributions
Docker runIt script
runIt supports Ubuntu 18, Fedora 30, Parrot and Kali at this time. It is possible to run the docker image on any Linux distribution, however, different distributions have different hoops to jump through to get a docker app to be able to connect to the X server. Eveyone is welcome to try and figure those hoops out and create a PR for runIt.

Traditional Install
We can only promise correct operation on Ubuntu 18 using the traditional installation at this time. While it should work on ParrotOS, Kali and others, until we have Legion packaged and placed into the repos for each of these distros it's musical chairs with reguards to platform updates changing and breaking dependancies.

DOCKER METHOD
Linux with Local X11:

Assumes Docker and X11 are installed and setup (including running docker commands as a non-root user)

It is crititcal to follow all the instructions for running as a non-root user. Skipping any of them will result in complications getting docker to communicate with the X server

See detailed instructions to setup docker here and enable running containers as non-root users and granting docker group ssh rights here

Within Terminal:

git clone https://github.com/GoVanguard/legion.git
cd legion/docker
chmod +x runIt.sh
./runIt.sh
Linux with Remote X11:

Assumes Docker and X11 are installed and setup
Replace X.X.X.X with the IP of the remote running X11.
Within Terminal:
git clone https://github.com/GoVanguard/legion.git
cd legion/docker
chmod +x runIt.sh
./runIt.sh X.X.X.X
Windows under WSL using Xming and Docker Desktop:

Assumes Xming is installed in Windows
Assumes Docker Desktop is installed in Windows, Docker Desktop is running in Linux containers mode and Docker Desktop is connected to WSL
See detailed instructions here
Replace X.X.X.X with the IP with which Xming has registered itself.
Right click Xming in system tray -> View log and see IP next to "XdmcpRegisterConnection: newAddress"
Within Terminal:
git clone https://github.com/GoVanguard/legion.git
cd legion/docker
sudo chmod +x runIt.sh
sudo ./runIt.sh X.X.X.X
Windows using Xming and Docker Desktop without WSL:

Why? Don't do this. :)
OSX using XQuartz:

Not yet in runIt.sh script.
Possible to setup using socat. See instructions here: https://kartoza.com/en/blog/how-to-run-a-linux-gui-application-on-osx-using-docker/
Setup Docker on Linux:

To install docker components typically needed and add setup the environment for docker, under a term, run:
sudo apt-get update
sudo apt-get install -y docker.io python-pip -y
sudo groupadd docker
pip install --user docker-compose
Setup Docker to allow non-root users:

To enable non-root users to run docker commands, under a term, run:
sudo usermod -aG docker $USER
sudo chmod 666 /var/run/docker.sock
sudo xhost +local:docker
Setup Hyper-V, Docker Desktop, Xming and WSL:

The order is important for port reservation reasons. If you have WSL, HyperV or Docker Desktop installed then please uninstall those features before proceeding.
Cortana / Search -> cmd -> Right click -> Run as Administrator
To reserve the docker port, under CMD, run:
netsh int ipv4 add excludedportrange protocol=tcp startport=2375 numberofports=1
This will likely fail if you have Hyper-V already enabled or Docker Desktop installed
To install Hyper-V, under CMD, run:
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Reboot
Cortana / Search -> cmd -> Right click -> Run as Administrator
To install WSL, under CMD, run:
dism.exe /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux
Reboot
Download from https://hub.docker.com/editions/community/docker-ce-desktop-windows (Free account required)
Run installer
Optionally input your docker hub login
Right click Docker Desktop in system tray -> Switch to Linux containers
If it says Switch to Windows containers then skip this step, it's already using Linux containers
Right click Docker Desktop in system tray -> Settings
General -> Expose on localhost without TLS
Download https://sourceforge.net/projects/xming/files/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe/download
Run installer and select multi window mode
Open Microsoft Store
Install Kali, Ubuntu or one of the other WSL Linux Distributions
Open the distribution, let it bootstrap and fill in the user creation details
To install docker components typically needed and add setup the environment for docker redirection, under the WSL window, run:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce python-pip -y
sudo apt autoremove
sudo usermod -aG docker $USER
pip install --user docker-compose
echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashrc
Test docker is reachable with:
docker images
TRADITIONAL METHOD
Please use the docker image where possible! It's becoming very difficult to support all the various platforms and their own quirks
Assumes Ubuntu, Kali or Parrot Linux is being used with Python 3.6 installed.
Within Terminal:
git clone https://github.com/GoVanguard/legion.git
cd legion
sudo chmod +x startLegion.sh
sudo ./startLegion.sh
LICENSE
Legion is licensed under the GNU General Public License v3.0. Take a look at the LICENSE for more information.

ATTRIBUTION
Refactored Python 3.6+ codebase, added feature set and ongoing development of Legion is credited to GoVanguard
The initial Sparta Python 2.7 codebase and application design is credited SECFORCE.
Several additional PortActions, PortTerminalActions and SchedulerSettings are credited to batmancrew.
The nmap XML output parsing engine was largely based on code by yunshu, modified by ketchup and modified SECFORCE.
ms08-067_check script used by smbenum.sh is credited to Bernardo Damele A.G.
Legion relies heavily on nmap, hydra, python, PyQt, SQLAlchemy and many other tools and technologies so we would like to thank all of the people involved in the creation of those.

Attached Files
LegionBanner.png (46,213 bytes)   
LegionBanner.png (46,213 bytes)   
LegionDemo-shrunk.gif (2,040,409 bytes)

Activities

GoVanguardMH

GoVanguardMH

2019-08-19 19:42

reporter   ~0010908

Logo & GIF Demo

GoVanguardMH

GoVanguardMH

2019-09-12 13:57

reporter   ~0011083

Can we target 2019.3 or 2019.4 / 2020 release for inclusion?

sbrun

sbrun

2019-09-17 09:02

manager   ~0011100

I started to work on this package. I didn't find big issues so far. I think it can be ready soon (before 2019.4 release)

I have a question about the Kali installation. Why do you do this? (what was the issue?)
echo "renameat2() work around for libQt5Core.so.5 and cutycapt"
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

We can't do such a thing in the Kali package. But if the issue is still present, we can work on it to fix it.

sbrun

sbrun

2019-10-15 14:15

manager   ~0011195

legion version 0.3.6-0kali1 is in kali-dev

GoVanguardMH

GoVanguardMH

2019-10-17 23:29

reporter   ~0011199

The purpose of "strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5" is to strip the library of the ABI-Tag kernel requirement.

This is only available in kernel > 3.15. So if the kernel is newer than this then this line can be omitted.

GoVanguardMH

GoVanguardMH

2019-10-24 20:22

reporter   ~0011221

If not already in the legion deps, please add the "xvfb" package to the legion dependencies.

We had xvfb missing from our installDep.sh script. Without xvfb, the screenshot functionality won't work.

Thanks

Dober

Dober

2019-10-24 22:22

reporter   ~0011222

@GoVanguardMH, as I can see "xvfb" is always in legion's dependencies.

GoVanguardMH

GoVanguardMH

2020-02-13 16:04

reporter   ~0012277

We've made some big updates to legion. Would it be possible to give our main legion dev sscottgvit (https://github.com/sscottgvit) access to the package in Kali's gitlab so we can merge some of the more recent updates to the package?

Some other housekeeping wishlist items:

  1. Start-Legion uses Legion Icon
  2. Start-Legion installs to proper menu group (Vulnerability Analysis)
  3. Legion eventually replaces Sparta (no longer maintained) as a default installed tool.
GoVanguardMH

GoVanguardMH

2020-02-13 16:14

reporter   ~0012278

Actually, I can see it's actually in sync... that's great!

Let us know if getting Shane access to the Gitlab is something that's reasonable. Also, let us know what we can do to assist with better integrating Legion into Kali and what requirements we would need to meet to be included as a default install.

Thanks!

rhertzog

rhertzog

2020-02-14 10:04

administrator   ~0012280

Hello @GoVanguardMH

before granting direct commit rights we prefer to get some merge requests to build trust relationships. But it's definitely possible in the future.

As for your other requests, I'm not sure what you are referring to. How can we better integrate legion?

I believe it's already part of the default installation since kali-linux-default depends on it.

Next time please open a different bug report, this one was to add legion, don't reopen it for other integration issues.

Issue History

Date Modified Username Field Change
2019-08-19 19:29 GoVanguardMH New Issue
2019-08-19 19:29 GoVanguardMH Status new => assigned
2019-08-19 19:29 GoVanguardMH Assigned To => sbrun
2019-08-19 19:42 GoVanguardMH File Added: LegionBanner.png
2019-08-19 19:42 GoVanguardMH File Added: LegionDemo-shrunk.gif
2019-08-19 19:42 GoVanguardMH Note Added: 0010908
2019-09-12 13:57 GoVanguardMH Note Added: 0011083
2019-09-17 09:02 sbrun Note Added: 0011100
2019-10-15 14:15 sbrun Note Added: 0011195
2019-10-17 23:29 GoVanguardMH Note Added: 0011199
2019-10-24 20:22 GoVanguardMH Note Added: 0011221
2019-10-24 22:22 Dober Note Added: 0011222
2019-12-23 08:43 sbrun Status assigned => resolved
2019-12-23 08:43 sbrun Resolution open => fixed
2019-12-23 08:43 sbrun Fixed in Version => 2020.1
2020-02-13 16:04 GoVanguardMH Status resolved => feedback
2020-02-13 16:04 GoVanguardMH Resolution fixed => reopened
2020-02-13 16:04 GoVanguardMH Note Added: 0012277
2020-02-13 16:14 GoVanguardMH Note Added: 0012278
2020-02-13 16:14 GoVanguardMH Status feedback => assigned
2020-02-14 10:04 rhertzog Note Added: 0012280
2020-02-18 13:25 sbrun Status assigned => resolved
2020-02-18 13:25 sbrun Resolution reopened => no change required
2020-12-01 10:48 g0tmi1k Priority high => normal
2021-05-31 13:37 rhertzog Category Tool Upgrade => Tool Upgrade Request