Archive

Archive for the ‘OS’ Category

SSH Config

February 10, 2017 Leave a comment

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
Categories: linux Tags: , ,

LibreOffice Base to View Access DB

October 20, 2016 Leave a comment

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:

  1. Make sure LibreOffice Base is installed – sudo apt-get install libreoffice-base
  2. Download UCanAccess and extract it – http://ucanaccess.sourceforge.net/site.html
  3. Launch LibreOffice (not Base, just the main launcher)
  4. Tools > Options > Advanced > Class Path
  5. Add Archive: /root/Downloads/UCanAccess-3.0.7-bin/loader/ucanload.jar
  6. Close LibreOffice Launcher

Per-Database setup:

  1. Launch Base
  2. Connect to an existing DB (JDBC)
  3. Datasource URL – jdbc:ucanaccess:///path/to/.accdb/file
  4. JDBC driver class – net.ucanaccess.jdbc.UcanloadDriver
  5. Next, leave blank
  6. Finish/Save
Categories: linux Tags: ,

PowerShell Empire on AWS

June 2, 2016 Leave a comment

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

Kali Linux Issue Starting Metasploit/Postgres

March 13, 2014 Leave a comment

When trying to start Metasploit from the Application menu or starting postgresql from the command line I got the following error:

“Starting PostgreSQL 9.1 database server: main[….] The PostgreSQL server failed to start. Please check the log output”

I was also running low on available space in my VM too, so clearing out the /tmp directory and running ‘apt-get clean’ seemed to help.  I updated the /usr/sbin/update-rc.d file and commented out postgres in the black list and wrote it in enabled in the white list section.  Then, after rebooting, I just had to start postgres manually:

su postgres -c "/usr/lib/postgresql/9.1/bin/postgres -D /etc/postgresql/9.1/main/" &


PwnPad Installation Tutorial thru Kali VM

October 9, 2013 Leave a comment

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!) –

  1. mkdir /opt/android && cd /opt/android
  2. echo “deb-src http://debian.ens-cachan.fr/ftp/debian/ sid main contrib non-free” >> /etc/apt/sources.list
  3. apt-get update
  4. apt-get -y build-dep android-tools
  5. apt-get -y source –build android-tools
  6. dpkg -i android-tools-*.deb
  7. cd ~
  8. rm -rf /opt/android
  9. 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.

Categories: Mobile, OS, Security Tools, Tutorial Tags: ,

Setup VNC Server in BT5 r3 KDE

October 30, 2012 Leave a comment
  1. Install vncserver – ‘apt-get install vnc4server’
  2. Run – ‘vncserver’
  3. Setup 8-character password
  4. Edit xstartup – ‘vi ~/.vnc/xstartup’
  5. Comment out entire file
  6. Append the following three lines to the file:
    • export XKL_XMODMAP_DISABLE=1
    • exec ck-launch-session startkde
    • exec pcmanfm –desktop
  7. Run – ‘vncserver -kill :1’
  8. 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

October 24, 2012 Leave a comment

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

  1. Download the tarball, extract to an easy to locate directory (e.g., /pentest/forensics/vxworks/).
  2. 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”

August 15, 2011 Leave a comment

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

November 2, 2009 1 comment

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

  1. Download the 8MB .iso image – mini.iso

Create and Configure VM

  1. File > New > Virtual Machine
  2. Custom, Next
  3. Choose desired workstation compatibility (e.g., Workstation 5)
  4. Installer disc image file (.iso), locate downloaded .iso from step 1
  5. Guest OS – Linux
  6. Version – Other 2.6.x kernel, Next
  7. Enter desired VM name and location for VM
  8. Select number of processors (e.g., 1)
  9. Select memory to allocate, 256MB should be plenty, Next
  10. Choose desired network connection (because of my location on my network I chose NAT), Next
  11. I/O Adapter type, leave default (LSI Logic), Next
  12. Create a new virtual disk, Next
  13. Virtual Disk Type – SCSI
  14. Max disk size 8GB (I chose to split into 2GB chunks, but it’s up to you), Next
  15. Name disk file or leave default, Next
  16. Check ‘Power on this virtual machine when finished’, Finish

Install and Configure OS

  1. You must be connected to the internet for this installation
  2. Choose Advanced options, hit enter
  3. Choose Expert install, hit enter
  4. Choose language – default (highlighted), enter
  5. Choose country – default (highlighted), enter
  6. Choose locale – default (highlighted), enter
  7. Choose other locales – hit ‘tab’, and then enter
  8. Choose keyboard – default (highlighted), enter
  9. Choose keymap – default (highlighted), enter
  10. Detect network hardware – default (highlighted)
  11. Start PC card – default (highlighted)
  12. PCMCIA (should be blank) – tab and then enter
  13. Detect network hardware  – default (highlighted)
  14. Config network – default (highlighted)
  15. Primary network – default (highlighted)
  16. Auto DHCP – choose YES
  17. Hostname – name it what ever you like, tab and then enter
  18. Domain name (should be blank) – hit tab then enter
  19. Choose mirror – default (highlighted)
  20. Protocol for file download – default (highlighted)
  21. Debian archive mirror country – default (highlighted)
  22. Debain archive mirror – choose whatever one is possibly closest to you
  23. HTTP Proxy (should be blank, unless you’re behind a proxy) – tab then enter
  24. Debian version to install – default (highlighted)
  25. Download installer components – default (highlighted)
  26. Installer components to load (choose nothing, should be default) – tab then enter
  27. Configure the clock – default (highlighted)
  28. Set clock using NTP  – default (highlighted)
  29. NTP server to use – default, hit tab then enter
  30. Select your timezone, enter
  31. Detect disks – default (highlighted), enter
  32. Partition disks – default (highlighted), enter
  33. Partition method – choose ‘Guided – use entire disk’, enter
  34. Select disk to partition – default (highlighted), enter
  35. Partitioning scheme – default (highlighted, unless you’d prefer something else), enter
  36. Partition overview – default (highlighted), enter
  37. Write changes to disks – choose yes
  38. Install base system – default (highlighted)
  39. Kernel to install – choose linux-image desired (at the time of this I’ve chosen -2.6.26-2-686)
  40. Drivers to include in the intitrd – default (highlighted)
  41. Setup users and pass – default (highlighted)
  42. Enable shadow pass – default (highlighted)
  43. Allow login as root – default (highlighted)
  44. Root pass, tab and then enter
  45. Confirm root pass, tab and then enter
  46. Normal user account – choose no and then enter
  47. Configure the pack manager – default (highlighted)
  48. Use non-free software – default (highlighted)
  49. Use contrib software – default (highlighted)
  50. Services to use – default, tab then enter
  51. Select and install software – default (highlighted)
  52. participate in package usage – default (highlighted)
  53. Choose software to install – choose nothing (deselect selected), tab and then enter
  54. Install the Grub boot loader – default (highlighted)
  55. Install Grub 2 – default (highlighted)
  56. Install the Grub boot loader to master boot record – default (highlighted)
  57. Grub password (should be blank) – tab and then enter
  58. Finish the installation – default (highlighted)
  59. System clock set to UTC – default (highlighted)
  60. Installation is complete – default (highlighted)
  61. System reboots
Categories: linux Tags: ,