Archive
SSH Config
If you use ssh a lot and you’re not in a Windows environment to use PuTTY, create a file – .ssh/config – with the following information:
Host myHost HostName x.x.x.x User userName Host myHost2 HostName y.y.y.y User userName2
LibreOffice Base to View Access DB
This is a summary of a post found on askubuntu.com. Useful for opening up an acquired accdb file on Debian/Ubuntu.
One-time setup:
- Make sure LibreOffice Base is installed – sudo apt-get install libreoffice-base
- Download UCanAccess and extract it – http://ucanaccess.sourceforge.net/site.html
- Launch LibreOffice (not Base, just the main launcher)
- Tools > Options > Advanced > Class Path
- Add Archive: /root/Downloads/UCanAccess-3.0.7-bin/loader/ucanload.jar
- Close LibreOffice Launcher
Per-Database setup:
- Launch Base
- Connect to an existing DB (JDBC)
- Datasource URL – jdbc:ucanaccess:///path/to/.accdb/file
- JDBC driver class – net.ucanaccess.jdbc.UcanloadDriver
- Next, leave blank
- Finish/Save
PowerShell Empire on AWS
I ran into quite a few issues setting up PowerShell Empire on an amazon ec2 server in the free tier. The following commands took quite a bit of research to figure out. Hopefully they will be usefull to others in the near future.
sudo pip install flask sudo pip install --upgrade pip (beware, this broke pip, had to then use easy_install) sudo yum install python27-pyOpenSSL.x86_64 sudo easy_install pyopengl* (not sure if necessary, but came across it on a post and things started working) sudo easy_install pydispatcher sudo easy_install iptools git clone https://github.com/Hypernode/M2Crypto.git sudo yum install swig sudo yum install openssl-devel sudo yum install gcc ./fedora_setup.sh build sudo python setup.py install sudo ./empire
PwnPad Installation Tutorial thru Kali VM
I attended the Pwnie Express PwnPad Installation class at DerbyCon 3.0 and found out how to install the PwnPad image on my Nexus7 (16GB, 1st generation, WiFi only) thru a Kali VM image. I won’t write out the entire process, just the differences from their installation document.
Unfortunately you can’t just “apt-get install adb fastboot” you have to add some french repositories and install a few other packages to get it going. The following commands should get you through that (many thanks to the Kali developer that attended the DerbyCon class for this!) –
- mkdir /opt/android && cd /opt/android
- echo “deb-src http://debian.ens-cachan.fr/ftp/debian/ sid main contrib non-free” >> /etc/apt/sources.list
- apt-get update
- apt-get -y build-dep android-tools
- apt-get -y source –build android-tools
- dpkg -i android-tools-*.deb
- cd ~
- rm -rf /opt/android
- sed -i ‘s/.*cachan\.fr.*//’ /etc/apt/sources.list
At command #6 I kept getting a “no space left on device” error, but running “apt-get clean” fixed that issue for me. Once that’s done, you should be good to go. Prep the USB drive like it says and follow the remaining instructions.
Once installed, open a root shell and hit enter a couple times, then type ‘yes’ when prompted to setup your ssh keys with a blank password (needed to run some of the scripts on the device). Be sure to install the latest updates from pwnieexpress.com (it’s easiest to just browse there on your tablet and then copy/paste the wget command into a shell on the device.
Setup VNC Server in BT5 r3 KDE
- Install vncserver – ‘apt-get install vnc4server’
- Run – ‘vncserver’
- Setup 8-character password
- Edit xstartup – ‘vi ~/.vnc/xstartup’
- Comment out entire file
- Append the following three lines to the file:
- export XKL_XMODMAP_DISABLE=1
- exec ck-launch-session startkde
- exec pcmanfm –desktop
- Run – ‘vncserver -kill :1’
- Run – ‘vncserver’
You then just need to install the free VNC Viewer on the client machine and make sure to add ‘:5901’ to the end of the IP address of your new vncserver.
VxWorks Debugging with BT5r3
I had to make a few modifications to the code referenced here in order to get it running in Backtrack 5 r3.
Download and extract the tarball
- Download the tarball, extract to an easy to locate directory (e.g., /pentest/forensics/vxworks/).
- Navigate to the directory and extract the files (‘tar zxvf filename.tar.gz’)
In the vxworks_mem_search.rb file, make sure the that you put the entire location to the vxworks_collide file in line 4, e.g.,
- require ‘/dir/dir/…/vxworks_collide’
To help with encoding issues, place the following at the beginning of the file
- # encoding: UTF-8
And then at the line where the file is reading the memory_data (“memory_data = File.read(input_file)”) add the following right after the closing parenthesis:
- .force_encoding(“ISO-8859-1”).encode(“utf-8”, replace: nil)
Save the file.
Run the file with the following command:
- ruby vmworks_mem_search.rb lookup.txt dump.mem (where dump.mem is the memory dumped using the corresponding metasploit exploit module)
Back|Track 5 64-bit KDE in VirtualBox – Failed to load module “vboxvideo”
When trying to run ‘startx’ with Back|Track 5 64-bit KDE iso running in VirtualBox I would get the following error – “Failed to load module ‘vboxvideo'”. I had a heck of a time searching for solutions and ultimately gave up and just ran the 32-bit. Today, however, I finally ran into a solution! Simply remove the icon-cache and plasma cache files from /root/.kde/cache-root/ directory. After you reboot, once BT5 is installed, remove the same files again, but this time from the /root/.kde/cache-bt/ directory. In order to get VirtualBox Additions you’ll need to install the following packages:
source-linux-source
source-linux-headers
Run “prepare-kernel-sources” and then the VB additions install script.
Thanks goes out to leandrotami for posting this solution here.
Install Bare-bones Debian 5 (Lenny) on VMWare Workstation
I’m just getting started with creating my own virtual environment so that I can start figuring out Nessus, WebInspect, Nmap, and several other scanning tools. This is the process I followed to setup a bare-bones (no GUI) Debian 5 linux system.
Download ISO
- Download the 8MB .iso image – mini.iso
Create and Configure VM
- File > New > Virtual Machine
- Custom, Next
- Choose desired workstation compatibility (e.g., Workstation 5)
- Installer disc image file (.iso), locate downloaded .iso from step 1
- Guest OS – Linux
- Version – Other 2.6.x kernel, Next
- Enter desired VM name and location for VM
- Select number of processors (e.g., 1)
- Select memory to allocate, 256MB should be plenty, Next
- Choose desired network connection (because of my location on my network I chose NAT), Next
- I/O Adapter type, leave default (LSI Logic), Next
- Create a new virtual disk, Next
- Virtual Disk Type – SCSI
- Max disk size 8GB (I chose to split into 2GB chunks, but it’s up to you), Next
- Name disk file or leave default, Next
- Check ‘Power on this virtual machine when finished’, Finish
Install and Configure OS
- You must be connected to the internet for this installation
- Choose Advanced options, hit enter
- Choose Expert install, hit enter
- Choose language – default (highlighted), enter
- Choose country – default (highlighted), enter
- Choose locale – default (highlighted), enter
- Choose other locales – hit ‘tab’, and then enter
- Choose keyboard – default (highlighted), enter
- Choose keymap – default (highlighted), enter
- Detect network hardware – default (highlighted)
- Start PC card – default (highlighted)
- PCMCIA (should be blank) – tab and then enter
- Detect network hardware – default (highlighted)
- Config network – default (highlighted)
- Primary network – default (highlighted)
- Auto DHCP – choose YES
- Hostname – name it what ever you like, tab and then enter
- Domain name (should be blank) – hit tab then enter
- Choose mirror – default (highlighted)
- Protocol for file download – default (highlighted)
- Debian archive mirror country – default (highlighted)
- Debain archive mirror – choose whatever one is possibly closest to you
- HTTP Proxy (should be blank, unless you’re behind a proxy) – tab then enter
- Debian version to install – default (highlighted)
- Download installer components – default (highlighted)
- Installer components to load (choose nothing, should be default) – tab then enter
- Configure the clock – default (highlighted)
- Set clock using NTP – default (highlighted)
- NTP server to use – default, hit tab then enter
- Select your timezone, enter
- Detect disks – default (highlighted), enter
- Partition disks – default (highlighted), enter
- Partition method – choose ‘Guided – use entire disk’, enter
- Select disk to partition – default (highlighted), enter
- Partitioning scheme – default (highlighted, unless you’d prefer something else), enter
- Partition overview – default (highlighted), enter
- Write changes to disks – choose yes
- Install base system – default (highlighted)
- Kernel to install – choose linux-image desired (at the time of this I’ve chosen -2.6.26-2-686)
- Drivers to include in the intitrd – default (highlighted)
- Setup users and pass – default (highlighted)
- Enable shadow pass – default (highlighted)
- Allow login as root – default (highlighted)
- Root pass, tab and then enter
- Confirm root pass, tab and then enter
- Normal user account – choose no and then enter
- Configure the pack manager – default (highlighted)
- Use non-free software – default (highlighted)
- Use contrib software – default (highlighted)
- Services to use – default, tab then enter
- Select and install software – default (highlighted)
- participate in package usage – default (highlighted)
- Choose software to install – choose nothing (deselect selected), tab and then enter
- Install the Grub boot loader – default (highlighted)
- Install Grub 2 – default (highlighted)
- Install the Grub boot loader to master boot record – default (highlighted)
- Grub password (should be blank) – tab and then enter
- Finish the installation – default (highlighted)
- System clock set to UTC – default (highlighted)
- Installation is complete – default (highlighted)
- System reboots