One to try:
https://dantheiotman.com/2017/11/21/using-re4sons-kali-pi-the-mana-toolkit-on-a-raspberry-pi-3/
Friday, January 12, 2018
Thursday, January 4, 2018
Raspberry Pi Pentest
I've been in the process of building out a Raspberry Pi 3 with Kali ARM Linux that can run some of the Kali included security tools, namely OpenVAS and Metasploit. After getting it installed, which I'll document more when it's ready, I got OpenVAS working but when I ran Metasploit I received the following:
=[ metasploit v4.16.28-dev ]
+ -- --=[ 1715 exploits - 984 auxiliary - 300 post ]
+ -- --=[ 507 payloads - 40 encoders - 10 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``': Cannot allocate memory - infocmp (Errno::ENOMEM)
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1815:in `get_term_capabilities'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2027:in `_rl_init_terminal_io'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2564:in `readline_initialize_everything'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:3849:in `rl_initialize'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4868:in `readline'
from /usr/share/metasploit-framework/lib/rex/ui/text/input/readline.rb:162:in `readline_with_output'
from /usr/share/metasploit-framework/lib/rex/ui/text/input/readline.rb:100:in `pgets'
from /usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:189:in `run'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
from /usr/bin/msfconsole:48:in `<main>'
The Raspberry Pi 3 only has 1GB of RAM and around 750MB of it was being used by the OS and OpenVAS, Metasploit couldn't get enough. I'm considering moving to an ODROID-C2 that has 2GB of RAM but that would require a new Kali image. While watching htop as msfconsole fired up I noticed that the Kali ARM dist doesn't have a swap partition or file so there's no swap space.
You can see this by running the 'free' command:
root@pi2222:/home/support# free
total used free shared buff/cache available
Mem: 949568 470544 68604 42588 410420 420912
Swap: 0 0 0
Run the following to create a 1GB swap file in /var and add it to the OS. Increase the dd command to 2000 to make it a 2GB file.
root@pi2222:~# cd /var
root@pi2222:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@pi2222:/var# touch swap.img
root@pi2222:/var# chmod 600 swap.img
root@pi2222:/var# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 94.6194 s, 11.1 MB/s
root@pi2222:/var# mkswap /var/swap.img
Setting up swapspace version 1, size = 1000 MiB (1048571904 bytes)
no label, UUID=91f5050f-ca7e-4fe8-9fc5-21ac5aecb478
root@pi2222:/var# swapon /var/swap.img
Now we have swap space:
root@pi2222:/var# free
total used free shared buff/cache available
Mem: 949568 468852 11584 42588 469132 422628
Swap: 1023996 0 1023996
Now msfconsole works, albeit a little slowly, so we'll see how it goes. I might just try an ODROID-C2 to see how it works, it has more cores and is 64-bit as well but is also double the cost of a Raspberry Pi 3.
Special thanks to this page for guidance on how to do this: https://www.optiv.com/blog/create-a-budget-friendly-virtual-private-server-with-a-metasploit-instance
=[ metasploit v4.16.28-dev ]
+ -- --=[ 1715 exploits - 984 auxiliary - 300 post ]
+ -- --=[ 507 payloads - 40 encoders - 10 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
/usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``': Cannot allocate memory - infocmp (Errno::ENOMEM)
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1815:in `get_term_capabilities'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2027:in `_rl_init_terminal_io'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2564:in `readline_initialize_everything'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:3849:in `rl_initialize'
from /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4868:in `readline'
from /usr/share/metasploit-framework/lib/rex/ui/text/input/readline.rb:162:in `readline_with_output'
from /usr/share/metasploit-framework/lib/rex/ui/text/input/readline.rb:100:in `pgets'
from /usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:189:in `run'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
from /usr/bin/msfconsole:48:in `<main>'
The Raspberry Pi 3 only has 1GB of RAM and around 750MB of it was being used by the OS and OpenVAS, Metasploit couldn't get enough. I'm considering moving to an ODROID-C2 that has 2GB of RAM but that would require a new Kali image. While watching htop as msfconsole fired up I noticed that the Kali ARM dist doesn't have a swap partition or file so there's no swap space.
You can see this by running the 'free' command:
root@pi2222:/home/support# free
total used free shared buff/cache available
Mem: 949568 470544 68604 42588 410420 420912
Swap: 0 0 0
Run the following to create a 1GB swap file in /var and add it to the OS. Increase the dd command to 2000 to make it a 2GB file.
root@pi2222:~# cd /var
root@pi2222:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@pi2222:/var# touch swap.img
root@pi2222:/var# chmod 600 swap.img
root@pi2222:/var# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 94.6194 s, 11.1 MB/s
root@pi2222:/var# mkswap /var/swap.img
Setting up swapspace version 1, size = 1000 MiB (1048571904 bytes)
no label, UUID=91f5050f-ca7e-4fe8-9fc5-21ac5aecb478
root@pi2222:/var# swapon /var/swap.img
Now we have swap space:
root@pi2222:/var# free
total used free shared buff/cache available
Mem: 949568 468852 11584 42588 469132 422628
Swap: 1023996 0 1023996
Now msfconsole works, albeit a little slowly, so we'll see how it goes. I might just try an ODROID-C2 to see how it works, it has more cores and is 64-bit as well but is also double the cost of a Raspberry Pi 3.
Special thanks to this page for guidance on how to do this: https://www.optiv.com/blog/create-a-budget-friendly-virtual-private-server-with-a-metasploit-instance
Wednesday, January 3, 2018
Kali Linux 2017 VirtualBox Guest Additions
I normally run Kali in a VirtualBox VM locally and never really dug into the guest additions, not having host to guest copy/paste finally annoyed me enough to find out how to install the guest additions. Turns out it's easy.
https://www.blackmoreops.com/2017/01/24/install-virtualbox-guest-additions-in-kali-linux/
Run apt-get update && apt-get upgrade && apt-get dist-upgrade then reboot. After that run apt-get install virtualbox-guest-x11 and reboot. Done.
Run apt-get update && apt-get upgrade && apt-get dist-upgrade then reboot. After that run apt-get install virtualbox-guest-x11 and reboot. Done.
Subscribe to:
Posts (Atom)
Current Audible Reading List
Title You Never Forget Your First: A Biography of George Washington A Self-Made Man: The Politica...
-
As part of a project I'm working on right now I wanted to know what the "optimal" settings were for running OpenVAS on an ODRO...
-
By default the OPenVAS security assistant listens on port 80 and redirects connections to port 9392, this causes issues if you want to run a...
-
I often have need to use Tor for various testing purposes, mainly to determine how an adversary uses it, and I often just want to run it fro...