• Publicidad

Shodan Tool 0.2

¿Estás desarrollando un proyecto, o piensas hacerlo? Pon aquí tu propuesta, lo más seguro es que alguien esté interesado en ayudarte.

Shodan Tool 0.2

Notapor BigBear » 2013-12-20 19:56 @872

Un simple script en Perl que hice con la ayuda de explorer para realizar búsquedas en Shodan usando el API que hicieron para Perl.

El código.

Sintáxis: [ Descargar ] [ Ocultar ]
Using perl Syntax Highlighting
  1. #!usr/bin/perl
  2. # Shodan Tool 0.2
  3. # (C) Doddy Hackman 2013
  4.  
  5. # Install the dependencies
  6. # sudo perl -MCPAN -e 'install CGI::Enurl'
  7. # sudo perl -MCPAN -e 'install JSON::XS'
  8. # sudo perl -MCPAN -e 'install HTTP::Request::Common'
  9. # Install Shodan
  10. # curl -OL http://github.com/downloads/achillean/s ... 0.3.tar.gz
  11. # tar zxvf Shodan-0.3.tar.gz
  12. # cd Shodan-0.3
  13. # perl Makefile.PL
  14. # make
  15. # sudo make install
  16.  
  17. use Shodan::WebAPI;
  18.  
  19. $SIG{INT} = \&copyright;
  20.  
  21. $your_key = "fuck you";    # Your Api Key
  22.  
  23. head();
  24.  
  25. unless ( $ARGV[0] ) {
  26.     print "\n[+] Sintax : $0 <search>\n";
  27. }
  28. else {
  29.  
  30.     print "\n[+] Searching ...\n";
  31.  
  32.     $shell_shodan = new Shodan::WebAPI($your_key);
  33.     $resultados   = $shell_shodan->search( $ARGV[0] );
  34.  
  35.     @encontrados = @{ $resultados->{"matches"} };
  36.  
  37.     for ( $i = 0 ; $i < $#encontrados ; ) {
  38.  
  39.         print "\n[+] Search Number : " . $i . "\n";
  40.  
  41.         if ( $encontrados[$i]->{country_name} eq "" ) {
  42.             print "[+] Country : Not Found\n";
  43.         }
  44.         else {
  45.             print "[+] Country : " . $encontrados[$i]->{country_name} . "\n";
  46.         }
  47.         if ( $encontrados[$i]->{ip} eq "" ) {
  48.             print "[+] IP : Not Found\n";
  49.         }
  50.         else {
  51.             print "[+] IP : " . $encontrados[$i]->{ip} . "\n";
  52.         }
  53.  
  54.         print "[+] Hostnames: ",
  55.           join( "\t", @{ $encontrados[$i]->{hostnames} } ), "\n";
  56.  
  57.         print "\n";
  58.  
  59.         if ( $encontrados[$i]->{os} eq "" ) {
  60.             print "[+] OS : Not Found\n";
  61.         }
  62.         else {
  63.             print "[+] OS : " . $encontrados[$i]->{os} . "\n";
  64.         }
  65.         if ( $encontrados[$i]->{port} eq "" ) {
  66.             print "[+] Port : Not Found\n";
  67.         }
  68.         else {
  69.             print "[+] Port : " . $encontrados[$i]->{port} . "\n";
  70.         }
  71.         if ( $encontrados[$i]->{updated} eq "" ) {
  72.             print "[+] Last Updated : Not Found\n";
  73.         }
  74.         else {
  75.             print "[+] Last Updated : " . $encontrados[$i]->{updated} . "\n";
  76.         }
  77.  
  78.         print "\n[Data Start]\n" . $encontrados[$i]->{data} . "\n[Data End]\n";
  79.  
  80.         $i++;
  81.  
  82.         if ( $i % 5 == 0 ) {
  83.             print "\n[+] Press enter to show more\n";
  84.             <STDIN>;
  85.         }
  86.     }
  87. }
  88.  
  89. copyright();
  90.  
  91. # Functions
  92.  
  93. sub head {
  94.     print "\n-- == Shodan Tool 0.2 == --\n";
  95. }
  96.  
  97. sub copyright {
  98.     print "\n-- == (C) Doddy Hackman 2013 == --\n";
  99.     exit(1);
  100. }
  101.  
  102. # The End ?
Coloreado en 0.006 segundos, usando GeSHi 1.0.8.4



Un ejemplo de uso:

Sintáxis: [ Descargar ] [ Ocultar ]
Using text Syntax Highlighting
doddy@doddy-desktop:~/Escritorio/HackingToolz/Warfactory IX/Shodan$ perl shodantool.pl "facultad"

-- == Shodan Tool 0.2 == --

[+] Searching ...

[+] Search Number : 0
[+] Country : Spain
[+] IP : 193.147.172.36
[+] Hostnames: ftp.fgh.us.es

[+] OS : Not Found
[+] Port : 21
[+] Last Updated : 27.11.2013
Wide character in print at shodanfinal.pl line 78.

[Data Start]
220-Microsoft FTP Service
220 FACULTAD DE GEOGRAF�A E HISTORIA. INFORMA�TICA
230-BIENVENIDOS AL SERVIDOR DE RECURSOS COMPARTIDOS DOCENTES DE LA FACULTAD DE GEOGRAF�A E HISTORIA
230 Anonymous user logged in.
214-The following  commands are recognized(* ==>'s unimplemented).
   ABOR
   ACCT
   ALLO
   APPE
   CDUP
   CWD  
   DELE
   FEAT
   HELP
   LIST
   MDTM
   MKD  
   MODE
   NLST
   NOOP
   OPTS
   PASS
   PASV
   PORT
   PWD  
   QUIT
   REIN
   REST
   RETR
   RMD  
   RNFR
   RNTO
   SITE
   SIZE
   SMNT
   STAT
   STOR
   STOU
   STRU
   SYST
   TYPE
   USER
   XCUP
   XCWD
   XMKD
   XPWD
   XRMD
214  HELP command successful.
[Data End]

[+] Search Number : 1
[+] Country : Bolivia
[+] IP : 200.87.234.18
[+] Hostnames:

[+] OS : Not Found
[+] Port : 21
[+] Last Updated : 25.11.2013

[Data Start]
220 Bienvenido al servicio de FTP de la Facultad de Ciencias Extactas y Tecnologia - U.A.G.R.M.
230 Login successful.
214-The following commands are recognized.
 ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD
 MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR
 RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
 XPWD XRMD
214 Help OK.
[Data End]

[+] Search Number : 2
[+] Country : Chile
[+] IP : 146.83.193.197
[+] Hostnames: zafiro.ciencias.ubiobio.cl

[+] OS : Not Found
[+] Port : 80
[+] Last Updated : 24.11.2013

[Data Start]
HTTP/1.0 302 Found
Date: Sun, 24 Nov 2013 04:06:36 GMT
Server: Apache/2.2.16 (Debian)
Location: http://146.83.193.197/facultad/
Vary: Accept-Encoding
Content-Length: 295
Content-Type: text/html; charset=iso-8859-1


[Data End]

[+] Search Number : 3
[+] Country : Venezuela
[+] IP : 190.169.126.3
[+] Hostnames: inving.ing.ucv.ve

[+] OS : Not Found
[+] Port : 21
[+] Last Updated : 23.11.2013

[Data Start]
220 FTP -2: - Facultad de Ingenieira
530 Login or password incorrect!
214-The following commands are recognized:
   USER   PASS   QUIT   CWD    PWD    PORT   PASV   TYPE
   LIST   REST   CDUP   RETR   STOR   SIZE   DELE   RMD
   MKD    RNFR   RNTO   ABOR   SYST   NOOP   APPE   NLST
   MDTM   XPWD   XCUP   XMKD   XRMD   NOP    EPSV   EPRT
   AUTH   ADAT   PBSZ   PROT   FEAT   MODE   OPTS   HELP
   ALLO   MLST   MLSD   SITE   P@SW   STRU   CLNT   MFMT
214 Have a nice day.
[Data End]

[+] Search Number : 4
[+] Country : Argentina
[+] IP : 163.10.23.131
[+] Hostnames: http://www.fcnym.unlp.edu.ar

[+] OS : Not Found
[+] Port : 80
[+] Last Updated : 23.11.2013

[Data Start]
HTTP/1.0 200 OK
Date: Sat, 23 Nov 2013 14:31:52 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.4
Set-Cookie: choiqueCMS-froNt3nD-facultad=qo7hgqq9cdir6t5pgsg0bgipe1; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=utf-8


[Data End]

[+] Press enter to show more


[+] Search Number : 5
[+] Country : Mexico
[+] IP : 148.224.13.152
[+] Hostnames: 152-13-static.uaslp.mx

[+] OS : Not Found
[+] Port : 80
[+] Last Updated : 23.11.2013

[Data Start]
HTTP/1.0 401 Unauthorized
Connection: Keep-Alive
Cache-Control: no-cache
WWW-Authenticate: Digest realm="FACULTAD DE PSICOLOGIA", domain="/", nonce="103efee03d", algorithm="MD5", qop="auth"
WWW-Authenticate: Basic realm="FACULTAD DE PSICOLOGIA"
Content-Type: text/html
Content-Length: 236


[Data End]

[+] Search Number : 6
[+] Country : Argentina
[+] IP : 190.11.104.87
[+] Hostnames: host87-104.cpenet.com.ar

[+] OS : Not Found
[+] Port : 137
[+] Last Updated : 22.11.2013

[Data Start]
NetBIOS Response
Servername: FACULTAD      
MAC: 00:1c:c0:9c:0a:ff

Names:
FACULTAD        <0x0>
SIX             <0x0>
FACULTAD        <0x20>
SIX             <0x1e>
SIX             <0x1d>
__MSBROWSE__ <0x1>

[Data End]

[+] Search Number : 7
[+] Country : Mexico
[+] IP : 132.248.18.23
[+] Hostnames: docencia.fca.unam.mx

[+] OS : Not Found
[+] Port : 143
[+] Last Updated : 22.11.2013

[Data Start]
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Bienvenido al servicio de correo DOCENCIA de la Facultad de Contaduria y administacion
[Data End]

[+] Search Number : 8
[+] Country : Argentina
[+] IP : 170.210.88.7
[+] Hostnames: firewall.unp.edu.ar

[+] OS : Not Found
[+] Port : 21
[+] Last Updated : 22.11.2013

[Data Start]
220 Bienvenido al FTP de la Facultad de Ingenieria.
530 Permission denied.
530 Please login with USER and PASS.
[Data End]

[+] Search Number : 9
[+] Country : Argentina
[+] IP : 170.210.240.9
[+] Hostnames: cacuy.fi.unju.edu.ar

[+] OS : Not Found
[+] Port : 25
[+] Last Updated : 20.11.2013

[Data Start]
220 cacuy.fi.unju.edu.ar Servidor de email Facultad de Ingenieria UNJu

[Data End]

[+] Press enter to show more
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Publicidad

Volver a Proyectos

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados

cron