Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - WhiZ

#101
Wargames y retos / Re:RETO XSS [Facil]
Febrero 21, 2015, 07:51:17 PM
Acá va mi screenshot:



Saludos!
WhiZ
#102
Talleres Underc0de / Re:Taller de Python #3
Febrero 21, 2015, 06:38:11 PM
Hola gomuNoob! Por lo que se aprecia en la imagen, el error radica en que el código es tomado como un comando para ejecutar con /system/bin/sh. Para que el código funcione, debes hacer que el mismo sea ejecutado por el intérprete de python (tal y como hiciste en la segunda imagen).

La verdad que no estoy seguro acerca de cuál es tu duda. Cualquier cosa, no dudes en comentar y vemos.

Saludos!
WhiZ
#103
Hacking ShowOff / Re:[XSS] Tuenti.com
Febrero 17, 2015, 04:39:39 AM
Grande Black! Todo un ejemplo a seguir, tanto en lo que respecta al conocimiento así como a la postura adoptada frente a esta situación.

Felicitaciones! HoF 100% merecido!

Saludos!
WhiZ
#104
Python / Re:Introducción a Python
Febrero 17, 2015, 04:37:42 AM
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Y el siguiente numero de este taller?? ???

En camino! Por cuestiones personales no he podido terminarlo aún pero estén atentos que próximamente lo tendremos a su disposición.

Saludos!
WhiZ
#105
Python / Re:Cifrado Compresor [Archivos]
Enero 29, 2015, 02:20:00 AM
Excelente aporte Azav! Qué bueno ver material de esta calidad por esta sección.

Espero que sigas así! Gracias por compartir!

Saludos!
WhiZ

P.D.: De ahora en más, intenta indentar con 4 espacios, por favor ;)
#106
Wargames y retos / Re:Underc0de Weekend #5
Enero 22, 2015, 05:56:47 PM
Acá va mi screenshot:


EDITO: Excelente reto Jimeno! Ya te lo dije por privado pero te lo digo nuevamente. Este tipo de retos constituyen una forma entretenida de aprender y compartir información. Enseñan mucho y nos hacen crecer. Gracias por eso.

Conociéndote, quedan muchos otros por retos por venir. Aquí estaré, listo para seguir aprendiendo :)

Saludos!
WhiZ
#107
Python / Re:Moviendonos entre archivos con python
Enero 22, 2015, 05:42:04 PM
Excelente aporte Once! Y muchas gracias Azav por complementarlo con tu información!

Así es como crecemos entre todos.

Un saludo y gracias por compartir!
WhiZ
#108
Hacking ShowOff / [XSS] clubaindependiente.com
Enero 08, 2015, 03:30:31 PM
Aquí dejo otro XSS en la página del CAIR jeje.



URL: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Reportado: NO
Vector: <script>confirm(/ WhiZ/ );</script>

Saludos!
WhiZ
#109
Hacking ShowOff / [XSS] bocajuniors.com.ar
Enero 08, 2015, 03:27:49 PM
Aquí un viejo XSS para alimentar la sección :)



URL: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Reportado: NO
Vector: <iframe src="You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login"/>

Saludos!
WhiZ
#110
Pentesting / Re:DIOS (Dump in One Shot) Explicado
Enero 07, 2015, 04:20:44 AM
Buenísimo arthusu! Ahora me voy a acostar q ya es muy tarde por acá. Lo dejo para disfrutarlo mañana, despierto jeje.

Gracias por compartir!

Saludos!
WhiZ
#111
Sí, yo siempre lo uso así:
Código: batch
netstat -bano


    - b: para ver el ejecutable que ha realizado la conexión

    - a: para ver las conexiones tcp y udp (muestra los puertos, incluso los q están en escucha)

    -n: tmb para ver los puertos

    - o: para ver el pid

En Linux se puede hacer algo similar con el siguiente comando:
Código: bash
netstat -pale


Saludos!
WhiZ
#112
Excelente! Como siempre, se aprende mucho de tus aportes hdbreaker!

Muchas gracias por compartir!

Saludos!
WhiZ
#113
Bueno, acá te dejo una de las últimas versiones (mis conocimientos en java no dan para mucho más jeje).

SERVER
Código: java
/* Server */
import java.net.*;
import java.io.*;

class Server {
    public static void main(String[] args) {
        System.out.println(" [*] Running server...");
        ServerSocket server;
        int port = 2236;

        try {
            server = new ServerSocket(port);
            System.out.println(" [+] OK");
            System.out.println(" [*] Waiting for clients on port " + server.getLocalPort());

            while (true) {
                Socket sock = server.accept();

                Thread t = new ThreadServerHandler(sock);
                t.start();
            }

        } catch(SocketTimeoutException e) {
            System.out.println(" [!] Error: " + e);

        } catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}

class ThreadServerHandler extends Thread {
    private Socket sock = null;

    public ThreadServerHandler(Socket sock) {
        super("ThreadServerHandler");
        this.sock = sock;
    }

    public void run() {
        try {
            System.out.println("\n [+] New client: " + sock.getRemoteSocketAddress());

            while (true) {
               
                // Receiving data
                DataInputStream input = new DataInputStream(sock.getInputStream());
                String data = input.readUTF();

                System.out.println("\n [*] Receiving data..." + data);
                System.out.println(" [+] OK");

                // Sending data

                DataOutputStream output = new DataOutputStream(sock.getOutputStream());
                System.out.println(" [*] Sending data..." + data);
                output.writeUTF(data);
                System.out.println(" [+] OK");

                // Exit
                if (data.equals("exit")) {
                    System.out.println("\n [*] Closing connection to host " + sock.getRemoteSocketAddress());
                    sock.close();
                    break;
                }
            }
        }
        catch (IOException e) {
            System.out.println(" [!] Error: the connection with host " +
                sock.getRemoteSocketAddress() + " has been lost");
        }
    }
}


CLIENT
Código: java
/* Client */

import java.net.*;
import java.io.*;
import java.util.Scanner;

class Client {
    public static void main(String[] args) {
        String server = "127.0.0.1";
        int port = 2236;
        System.out.println(" [*] Connecting to the server [" + server + ":" + port + "]");

        try {
            Socket client = new Socket(server, port);
            System.out.println(" [+] OK");

            while (true) {
                // Input
                System.out.print("\n [?] Command: ");
                Scanner scan = new Scanner(System.in);
                String data = scan.nextLine();
                data.trim();

                // Sending data
                System.out.println(" [*] Sending data..." + data);
                DataOutputStream output = new DataOutputStream(client.getOutputStream());
                output.writeUTF(data);
                System.out.println(" [+] OK");

                // Receiving data
                DataInputStream input = new DataInputStream(client.getInputStream());
                data = input.readUTF();
                System.out.println(" [*] Receiving data..." + data);
                System.out.println(" [+] OK");

                // Exit
                if (data.equals("exit")) {
                    System.out.println("\n [*] Closing connection...");
                    client.close();
                    break;
                }
            }
        }
        catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}


Faltaría que modifiques el servidor para que trate a cada dato recibido como un comando, es decir, que lo envíe como comando al sistema y, finalmente, devuelva la respuesta al cliente (seguro que en un rato lo hago). Con eso ya tendrías una remote shell. Si querés obtener algo mejor y más actualizado, tenés que invertir los roles, es decir, hacer que el cliente reciba los comandos, los ejecute en el sistema y envíe de vuelta la respuesta al servidor (con eso lograrías una reverse shell ;) ).

Saludos!
WhiZ



Bueno, última edición. Acá te dejo la remote shell. Con este código podrás ejecutar comandos de forma remota. Sólo te queda hacerlo reverse  :)

SERVER
Código: java
/* Server */
import java.net.*;
import java.io.*;

class Server {
    public static void main(String[] args) {
        System.out.println(" [*] Running server...");
        ServerSocket server;
        int port = 2236;

        try {
            server = new ServerSocket(port);
            System.out.println(" [+] OK");
            System.out.println(" [*] Waiting for clients on port " + server.getLocalPort());

            while (true) {
                Socket sock = server.accept();

                Thread t = new ThreadServerHandler(sock);
                t.start();
            }

        } catch(SocketTimeoutException e) {
            System.out.println(" [!] Error: " + e);

        } catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}

class ThreadServerHandler extends Thread {
    private Socket sock = null;

    public ThreadServerHandler(Socket sock) {
        super("ThreadServerHandler");
        this.sock = sock;
    }

    public void run() {
        try {
            System.out.println("\n [+] New client: " + sock.getRemoteSocketAddress());

            while (true) {
               
                // Receiving data
                DataInputStream input = new DataInputStream(sock.getInputStream());
                String data = input.readUTF();

                System.out.println("\n [*] Receiving data from " +
                    sock.getRemoteSocketAddress() + "..." + data);
                System.out.println(" [+] OK");

                // Exit
                if (data.equals("exit")) {
                    System.out.println("\n [*] Closing connection to host " + sock.getRemoteSocketAddress());
                    DataOutputStream output = new DataOutputStream(sock.getOutputStream());
                    output.writeUTF(data);
                    sock.close();
                    break;
                }

                // Running the command
                String stdout = runCmd(data);

                // Sending data

                DataOutputStream output = new DataOutputStream(sock.getOutputStream());
                System.out.println(" [*] Sending data to " +
                sock.getRemoteSocketAddress() + "...");
                output.writeUTF(stdout);
                System.out.println(" [+] OK");

            }

        } catch (IOException e) {
            System.out.println(" [!] Error: the connection with host " +
                sock.getRemoteSocketAddress() + " has been lost");
        }
    }

    public String runCmd(String cmd) {
        try {
            String line = null;
            StringBuilder builder = new StringBuilder();
            builder.append("\n\n");

            Process p = Runtime.getRuntime().exec(cmd);
            p.waitFor();
         
            BufferedReader stdout = new BufferedReader(new InputStreamReader(p.getInputStream()));

            while ((line = stdout.readLine()) != null) {
                builder.append(line);
                builder.append(System.getProperty("line.separator"));
            }

            return builder.toString();

        } catch (IOException e) {
            System.out.println(" [!] Error: " + e);
            return "";

        } catch (InterruptedException e) {
            System.out.println(" [!] Keyboard Interrupt");
            return "";
        }
    }
}


CLIENT
Código: java
/* Client */

import java.net.*;
import java.io.*;
import java.util.Scanner;

class Client {
    public static void main(String[] args) {
        String server = "127.0.0.1";
        int port = 2236;
        System.out.println(" [*] Connecting to the server [" + server + ":" + port + "]");

        try {
            Socket client = new Socket(server, port);
            System.out.println(" [+] OK");

            while (true) {
                // Input
                System.out.print("\n [?] Command: ");
                Scanner scan = new Scanner(System.in);
                String data = scan.nextLine();
                data.trim();

                // Sending data
                System.out.println(" [*] Sending data..." + data);
                DataOutputStream output = new DataOutputStream(client.getOutputStream());
                output.writeUTF(data);
                System.out.println(" [+] OK");

                // Receiving data
                System.out.print(" [*] Receiving data...");
                DataInputStream input = new DataInputStream(client.getInputStream());
                data = input.readUTF();
                System.out.println(data);
                System.out.println(" [+] OK");

                // Exit
                if (data.equals("exit")) {
                    System.out.println("\n [*] Closing connection...");
                    client.close();
                    break;
                }
            }
        }
        catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}


Espero que te sirva y que puedas llevar a cabo con éxito tu proyecto.

Saludos!
WhiZ
#114
Acá te dejo un simple sistema cliente-servidor.

SERVER
Código: java
/* Server */
import java.net.*;
import java.io.*;

class Server {
    public static void main(String[] args) {
        System.out.println(" [*] Running server...");
        ServerSocket server;
        int port = 2236;

        try {
            server = new ServerSocket(port);
            System.out.println(" [+] OK");

            System.out.println(" [*] Waiting for clients on port " + server.getLocalPort());
            Socket sock = server.accept();
            System.out.println(" [+] New client: " + sock.getRemoteSocketAddress());

            DataInputStream input = new DataInputStream(sock.getInputStream());
            System.out.println(" [*] Receiving data..." + input.readUTF());
            System.out.println(" [+] OK");

            DataOutputStream output = new DataOutputStream(sock.getOutputStream());
            System.out.println(" [*] Sending data...");
            output.writeUTF("Visit and join us at http://underc0de.org ;)");
            System.out.println(" [+] OK");

            sock.close();
        }
        catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}


CLIENT
Código: java
/* Client */

import java.net.*;
import java.io.*;

class Client {
    public static void main(String[] args) {
        String server = "127.0.0.1";
        int port = 2236;
        System.out.println(" [*] Connecting to the server [" + server + ":" + port + "]");

        try {
            Socket client = new Socket(server, port);
            System.out.println(" [+] OK");

            DataOutputStream output = new DataOutputStream(client.getOutputStream());
            System.out.println(" [*] Sending data...");
            output.writeUTF("Hello!");
            System.out.println(" [+] OK");

            DataInputStream input = new DataInputStream(client.getInputStream());
            System.out.println(" [*] Receiving data..." + input.readUTF());
            System.out.println(" [+] OK");

            client.close();
        }
        catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}


Con esto ya tenés un servidor que espera, automáticamente (me refiero, sin botones o cualquier otro evento), una conexión entrante.
En un rato subo el código con el bucle que te comentaba antes para lograr una interacción más dinámica.

Espero que esto te sirva de base para continuar.

Saludos!
WhiZ




EDITO: Ahora sí. Esta sería una versión más avanzada, con un bucle en el server que espera conexiones entrantes. Una vez iniciada una nueva conexión, se la pasa a la clase ThreadServerHandler quién se encarga del resto. El cliente sigue igual.

SERVER
Código: java
/* Server */
import java.net.*;
import java.io.*;

class Server {
    public static void main(String[] args) {
        System.out.println(" [*] Running server...");
        ServerSocket server;
        int port = 2236;

        try {
            server = new ServerSocket(port);
            System.out.println(" [+] OK");

            while (true) {
                System.out.println(" [*] Waiting for clients on port " + server.getLocalPort());
                Socket sock = server.accept();

                Thread t = new ThreadServerHandler(sock);
                t.start();
            }

        } catch(SocketTimeoutException e) {
            System.out.println(" [!] Error: " + e);

        } catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}

class ThreadServerHandler extends Thread {
    private Socket sock = null;

    public ThreadServerHandler(Socket sock) {
        super("ThreadServerHandler");
        this.sock = sock;
    }

    public void run() {
        try {
            System.out.println(" [+] New client: " + sock.getRemoteSocketAddress());

            DataInputStream input = new DataInputStream(sock.getInputStream());
            System.out.println(" [*] Receiving data..." + input.readUTF());
            System.out.println(" [+] OK");

            DataOutputStream output = new DataOutputStream(sock.getOutputStream());
            System.out.println(" [*] Sending data...");
            output.writeUTF("Visit and join us at http://underc0de.org ;)");
            System.out.println(" [+] OK");

            sock.close();
        }
        catch (IOException e) {
            System.out.println(" [!] Error: " + e);
        }
    }
}


Lo que tendrías que hacer ahora es modificar la clase ThreadServerHandler: poner un bucle que reciba y envíe información hasta que por medio de un evento determinado, finalice la conexión. Los cambios que hagas en dicha clase deberán acompañarse de las modificaciones respectivas en el cliente.

Espero que te sirva!

Saludos!
WhiZ

P.D.: Seguro que más tarde subo un nuevo código, así practico un poco de java jeje
#115
Grande bro! Excelente trabajo!

Ahora estoy en tapatalk pero te prometo un +1 para cuando tenga la pc.

Saludos!
WhiZ
#116
Back-end / Re:Mi juego de poker en php/javascript
Enero 03, 2015, 12:56:11 AM
Grande Alex! Excelente como siempre! Mañana voy a chuamear un poco los códigos a ver si aprendo algo jeje.

Gracias por compartir!
Saludos!
WhiZ
#117
Dudas y pedidos generales / Re:Entorno grafico en C
Enero 03, 2015, 12:52:13 AM
Qt es una masa. Y para python (ya me voy de tema) kivy tmb es excelente.

Saludos!
WhiZ
#118
Lo primero que haría es crear un sistema cliente-servidor. En el servidor creas un socket que se quede a la espera del cliente. Cuando el cliente se conecte creas un thread para esa comunicación y, por medio de un bucle la mantenes hasta que un evento determinado lo finalice.

Saludos!
WhiZ
#119
La verdad que no las miré muy bien pero creo que estas páginas te van a servir:

    - You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
    - You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Espero que te sirva!

Saludos!
WhiZ
#120
Tal cual. Lo q haces es crear el Server (en este caso con darkcomet) y, con metasploit, anexarlo a un pdf.

Lo mismo puede hacerse, pero sin necesidad de metasploit, con un powerpoint.

Si buscas en google vas a encontrar muchos tutoriales al respecto.

Saludos!
WhiZ