Results 1 to 2 of 2

Thread: RaspberryPi fun with Kali Linux

  1. #1
    Join Date

    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

    Using a button to start a script is very simple.

    from time import sleep
    import os
    import RPi.GPIO as GPIO
    GPIO.setup(10, GPIO.IN)
    GPIO.setup(9, GPIO.IN)
    GPIO.setup(11, GPIO.IN)
    while True:
            if ( GPIO.input(9) == False ):
                    os.system('./ &')
            if ( GPIO.input(10) == False ):
                    os.system('msfconsole –r /root/PWNED &')
            if ( GPIO.input(11) == False ):
                    os.system('echo "123456" >> hello.txt')

    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.

    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.

    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.

    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.)

    /* Redirect browser */
    header("Location: http:/index.html");
    shell_exec("sudo /root/PYTHON/ start");
    shell_exec("sudo /root/PYTHON/ 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
    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