* add .gitignore

* add project

* add tools

* add support for alias update

* clean code

* Update pentools.sh

Add check if the software is already installed

* Update pentools.sh

Remove output from chrome install

* Update pentools.sh

* Change running command

* Update pentools.sh

* Fix sublime-text install & Fix Alias

* Update README.md

---------

Co-authored-by: d3vyce <contact@d3vyce.fr>
This commit is contained in:
d3vyce 2023-02-04 22:49:35 +01:00 committed by GitHub
parent 327772f7d6
commit acdbece4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 247 additions and 1 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
binary/
tools/
wordlist/

View File

@ -1 +1,46 @@
# PenTools
# PenTools
![terminal](https://github.com/d3vyce/PenTools/images/terminal.png)
# Quick Start
Before running the script make sure you have `go` and `pip` installed.
```bash
sudo apt install gccgo-go
sudo apt install python-pip
```
To run the script use the following command:
```Bash
bash <(curl -s https://github.com/d3vyce/PenTools/releases/latest/download/pentools.sh)
```
This script has been tested on debian distribution, but it should also work with Ubuntu.
I'm working on a compatibility with CentOS and other distribution.
# Content
## Wordlist
- rockyou.txt
- common.txt
- subdomains.txt
## Software
- Sublime Text
- Chrome (+Extension: Dark Reader, FoxyProxy, WappAnalyser, Hack-Tools)
- FFUF
- PWNcat
## Tools
- linPeas
- winPeas
- LinEnum
- linux-exploit-suggester
- mimikatz
## Binary
- nmap
## Alias
- Python server file in pentools folder (command: `filesrv`)
- Open Sublime-Text (command : `sublime`) -> To open Sublime-Text in current folder : `sublime .`
# Contribute to the project
To participate in the project, you can propose new implementations of tools/binary/software/... via issues or merge request.

BIN
images/terminal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

198
pentools.sh Executable file
View File

@ -0,0 +1,198 @@
#!/bin/bash
C=$(printf '\033')
RED="${C}[1;31m"
YELLOW="${C}[1;33m"
BLUE="${C}[1;34m"
GREEN="${C}[1;32m"
ITALIC_LIGHT_CYAN="${C}[1;96m${C}[3m"
ITALIC="${C}[3m"
wordlist() {
printf "\n${YELLOW}[*]${BLUE} Wordlist ---------------------------------\n"
mkdir $TARGET/wordlist >/dev/null 2>&1
printf ${GREEN}"[+] rockyou.txt\n"
curl https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt > $TARGET/wordlist/rockyou.txt 2>&1
printf ${GREEN}"[+] common.txt\n"
curl http://ffuf.me/wordlist/common.txt > $TARGET/wordlist/common.txt 2>&1
printf ${GREEN}"[+] subdomains.txt\n"
curl http://ffuf.me/wordlist/subdomains.txt > $TARGET/wordlist/subdomains.txt 2>&1
}
software() {
printf "\n${YELLOW}[*]${BLUE} Software ---------------------------------\n"
printf ${GREEN}"[+] Sublime-text\n"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - >/dev/null 2>&1
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list >/dev/null 2>&1
sudo apt update
sudo apt -y install sublime-text >/dev/null 2>&1
printf ${GREEN}"[+] Chrome\n"
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb >/dev/null 2>&1
sudo apt -y install ./google-chrome-stable_current_amd64.deb >/dev/null 2>&1
rm google-chrome-stable_current_amd64.deb
sudo mkdir /opt/google/chrome/extensions >/dev/null 2>&1
printf ${GREEN}"[+] Chrome Extension: FoxyProxy\n"
sudo touch /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json
sudo chmod 646 /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json
sudo echo '{
"external_update_url": "https://clients2.google.com/service/update2/crx"
}' > /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json
printf ${GREEN}"[+] Chrome Extension: Dark Reader\n"
sudo touch /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json
sudo chmod 646 /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json
sudo echo '{
"external_update_url": "https://clients2.google.com/service/update2/crx"
}' > /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json
printf ${GREEN}"[+] Chrome Extension: WappAnalyser\n"
sudo touch /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json
sudo chmod 646 /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json
sudo echo '{
"external_update_url": "https://clients2.google.com/service/update2/crx"
}' > /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json
printf ${GREEN}"[+] Chrome Extension: Hack-Tools\n"
sudo touch /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json
sudo chmod 646 /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json
sudo echo '{
"external_update_url": "https://clients2.google.com/service/update2/crx"
}' > /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json
if ! command -v go &> /dev/null
then
printf ${RED}"[x] Missing Go, skipping install of Fuff...\n"
else
if ! command -v ffuf &> /dev/null
then
printf ${GREEN}"[+] ffuf\n"
go install github.com/ffuf/ffuf@latest >/dev/null 2>&1
else
printf ${ITALIC_LIGHT_CYAN}"[~] ffuf is already installed, skipping...\n"
fi
fi
if ! command -v pip &> /dev/null
then
printf ${RED}"[x] Missing Pip, skipping install of PwnCat...\n"
else
if ! command -v pwncat-cs &> /dev/null
then
printf ${GREEN}"[+] pwncat-cs\n"
sudo pip install pwncat-cs >/dev/null 2>&1
else
printf ${ITALIC_LIGHT_CYAN}"[~] pwncat-cs is already installed, skipping...\n"
fi
fi
}
tools() {
printf "\n${YELLOW}[*]${BLUE} Tools ------------------------------------\n"
mkdir tools >/dev/null 2>&1
printf ${GREEN}"[+] linPeas.sh\n"
wget -q -O - https://github.com/carlospolop/PEASS-ng/releases/download/20230129/linpeas.sh > $TARGET/tools/linPeas.sh 2>&1
chmod +x $TARGET/tools/linPeas.sh
printf ${GREEN}"[+] winPeas.bat\n"
wget -q -O - https://github.com/carlospolop/PEASS-ng/releases/download/20230129/winPEAS.bat > $TARGET/tools/winPeas.bat 2>&1
printf ${GREEN}"[+] LinEnum.sh\n"
curl https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh > $TARGET/tools/LinEnum.sh 2>&1
chmod +x $TARGET/tools/LinEnum.sh
printf ${GREEN}"[+] linux-exploit-suggester.sh\n"
curl https://raw.githubusercontent.com/The-Z-Labs/linux-exploit-suggester/master/linux-exploit-suggester.sh > $TARGET/tools/linux-exploit-suggester.sh 2>&1
chmod +x $TARGET/tools/linux-exploit-suggester.sh
printf ${GREEN}"[+] mimikatz.exe\n"
wget -q -O - https://github.com/ParrotSec/mimikatz/blob/master/Win32/mimikatz.exe > $TARGET/tools/mimikatz.exe 2>&1
}
binary() {
printf "\n${YELLOW}[*]${BLUE} Binary -----------------------------------\n"
mkdir binary >/dev/null 2>&1
printf ${GREEN}"[+] nmap\n"
wget -q -O - https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/nmap > $TARGET/binary/nmap
chmod +x $TARGET/binary/nmap
}
aliascmd() {
printf "\n${YELLOW}[*]${BLUE} Alias ------------------------------------\n"
sed -i '/# Alias created by PenTools/,/# https:\/\/github.com\/d3vyce\/pentools/d' ~/.bash_aliases
echo "
# Alias created by PenTools" >> ~/.bash_aliases
printf ${GREEN}"[+] sudo filesrv\n"
echo "alias filesrv='sudo python3 -m http.server 80 --directory ${TARGET}'" >> ~/.bash_aliases
printf ${GREEN}"[+] sublime\n"
echo "alias sublime='/opt/sublime_text/sublime_text'" >> ~/.bash_aliases
echo "# https://github.com/d3vyce/pentools" >> ~/.bash_aliases
source ~/.bash_aliases
}
printf "${YELLOW}
---------------------------------------------
____ ______ __
/ __ \___ ____/_ __/___ ____ / /____
/ /_/ / _ \/ __ \/ / / __ \/ __ \/ / ___/
/ ____/ __/ / / / / / /_/ / /_/ / (__ )
/_/ \___/_/ /_/_/ \____/\____/_/____/
---------------------------------------------
v1.0 - ${ITALIC}https://github.com/d3vyce/pentools \n
"
printf ${YELLOW}"[*]${BLUE} What do you want to install?\n"
printf "${ITALIC_LIGHT_CYAN} 1: All\n"
printf "${ITALIC_LIGHT_CYAN} 2: Wordlist\n"
printf "${ITALIC_LIGHT_CYAN} 3: Software\n"
printf "${ITALIC_LIGHT_CYAN} 4: Tools\n"
printf "${ITALIC_LIGHT_CYAN} 5: Binary\n"
printf "${ITALIC_LIGHT_CYAN} 6: Alias\n"
read -p "${BLUE}Choice [${YELLOW}1${BLUE}]: ${YELLOW}" CHOICE
CHOICE=${CHOICE:-1}
PWD=$(pwd)
read -p "${BLUE}Target [${YELLOW}$PWD${BLUE}]: ${YELLOW}" TARGET
TARGET=${TARGET:-$PWD}
case $CHOICE in
1)
wordlist
software
tools
binary
aliascmd
;;
2)
wordlist
;;
3)
software
;;
4)
tools
;;
5)
binary
;;
6)
aliascmd
;;
*)
printf "${RED}[x] Select an option between 1 and 6"
;;
esac