How to Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & More

How to Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & More

A lot of time can be wasted performing trivial tasks over and over again, and it's especially true when it comes to hacking and penetration testing. Trying different shells to own a target, and testing out privilege escalation commands afterward, can eat up a lot of time. Fortunately, there is a tool called One-Lin3r that can quickly generate shells, privesc commands, and more.


One-Lin3r is a Python tool that acts as a framework to automate the generation one-liners commonly used in pentesting and hacking. Its usage is very similar to Metasploit, so it's natural and simple to pick up for most people. The tool contains features such as auto-complete, search suggestion, automatic copying, and smart searching, making it a breeze to find whatever you're looking for.


In this tutorial, we will be using Metasploitable 2 as the target and Kali Linux as our local machine. You can use a similar setup to follow along.


Installing & Basic Usage


The first thing we need to do is install One-Lin3r. It requires Python 3, so the easiest way to do this is with pip3. It will install the tool along with any dependencies it may need.


~# pip3 install one-lin3r Collecting one-lin3r Downloading https://files.pythonhosted.org/packages/87/bc/603e4262e3e268e0e2ff54f7f87bbc638f5c4356f893396e2575379bc0cb/one_lin3r-2.0-py3-none-any.whl (100kB) 100% |████████████████████████████████| 102kB 1.4MB/s
Collecting terminaltables (from one-lin3r) Downloading https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/ ..

Support the originator by clicking the read the rest link below.