Results 1 to 2 of 2

Thread: RaspberryPi fun with Kali Linux

  1. #1
    Join Date
    2013-Mar
    Posts
    2

    RaspberryPi fun with Kali Linux

    I received my first Raspberry Pi last summer and have been learning and building since. I have just been installing the packages I needed; SSLStrip, Ngrep, Dsniff, SET, BEef, Reaver, etc. It is great to see the new Kali Linux version released. I would like to share a particular project that I started as a school project but has become much more. This has been a learning experience and I am most accurately not a programmer. Hopefully this will inspire much better code than I am capable of devising right now as well as spark discussion and bring outside insight to the concept.

    Using a combination of a few tutorials of the Raspberry Pi, listed below, I have been able to build a small PCB board with an LCD module as a display and programmable buttons that can start Python or Bash scripts, Metasploit resource files, or whatever. I have also been using PHP and HTML to view log files, execute scripts, start and stop services, or kill processes. I have even written a script using airbase to create an access point and bridge it with the Ethernet interface. Oh, and it is also running on battery power. (A must for covert operations.)

    Here are some pictures and video of my Raspberry Pi project. (I know you could totally do a better job than I did!)

    Screen Shots
    http://1ijnnji1.blogspot.com





    Using a button to start a script is very simple.
    http://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/overview


    Code:
    #!/usr/bin/python
    
    from time import sleep
    import os
    import RPi.GPIO as GPIO
    
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(10, GPIO.IN)
    GPIO.setup(9, GPIO.IN)
    GPIO.setup(11, GPIO.IN)
    
    while True:
            if ( GPIO.input(9) == False ):
                    os.system('./startUrlsnaf.sh &')
            if ( GPIO.input(10) == False ):
                    os.system('msfconsole –r /root/PWNED &')
            if ( GPIO.input(11) == False ):
                    os.system('echo "123456" >> hello.txt')
            sleep(1);

    Next I thought it would be great if I could use an LCD module to display what scripts are running or display the IP Address at boot time. There are many ways to call the LCD script; buttons, PHP, etc.

    http://www.raspberrypi-spy.co.uk/201...-using-python/


    You can run these display and button scripts at boot time. So the buttons will work as soon as the boot process has finished.

    This is also a good time to have the Raspberry Pi use autossh to connect to a relay server to create an SSH session behind a firewall.

    Code:
    autossh  –M 20000 –N –R 4444:localhost:22 bob@RelayServer
    SSH into the Relay Server and control the Raspberry Pi via a proxy with browser or directly use the shell.

    Code:
    ssh bob@RelayServer –p 4444 –D 8080

    Very Simple PHP example (I have been using an HTML page with a hyperlink to the PHP page.)

    Code:
    <?php
    /* Redirect browser */
    header("Location: http:/index.html");
    shell_exec("sudo /root/PYTHON/yourScript.sh start");
    shell_exec("sudo /root/PYTHON/yourScript.sh start");
    ?>

    Very simple stuff but I am just throwing some fresh ideas out there and sharing.
    Of course it would be impossible to list everything that I have done with this
    project or go into greater detail here. I just hope this will spark some ideas/discussions.

  2. #2
    Join Date
    2013-Apr
    Posts
    4
    Nice one. I too have an 16x2 LCD lying around. Should try connecting it to my RPi.

Similar Threads

  1. Replies: 2
    Last Post: 2021-06-23, 15:54
  2. Raspberrypi 4 autologin
    By thefugue in forum ARM Archive
    Replies: 2
    Last Post: 2021-03-07, 17:30
  3. Is SSH enabled by default on Kali RaspberryPi distro?
    By Kali Arte Martial in forum ARM Archive
    Replies: 0
    Last Post: 2020-09-19, 09:11
  4. RaspberryPi 3 Kali Bluethoot no devices
    By Vitama in forum ARM Archive
    Replies: 3
    Last Post: 2016-11-27, 19:29
  5. Replies: 0
    Last Post: 2013-08-22, 13:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •