SewerPunk - By DJ Boo!

SoldierX.com Hakin9 Magazine HAX Radio - The stream the FBI Listens to! Offensive Security Wireless Professional PWNIE 2012 Nominations The Hip-Hop Realm

Archive for the ‘Howto’ Category

Entify Package Manager

Wednesday, May 1st, 2013

https://code.google.com/p/entify-pm

I created Entify to have the latest and greatest of not only my applications, but other’s too. including mostly all bleeding edge WiFi hacking and administration applications specifically compiled to take full advantage of all resources.

Entify will use my web-server as a repository for the source code tarballs.

I will be releasing an ALPHA copy to the Google Code page sometime this week or weekend. stay tuned!

~Douglas

Change the Color of Text on your Wbar

Tuesday, April 2nd, 2013

wbar is an amazing light-weight dock application that I have been using with FluxBox for years. Recently, with the release of WEAKERTH4N: BLUE GHOST, I made my own icon theme and set for the distro which clashed with the white letters used in the text of wbar making it unreadable:

So I decided to download the latest version of wbar and take a looksy at the sauce. To compile this code you will need the following dependencies:

libglade2-dev
libimlib2-dev
intltool

Which you can install on Debian systems with aptitude – no problem.

I use grep when troubleshooting or reverse engineering code – it’s my first go-to for analyzing other’s code. I grepped recursively for the word color and found the lines:

/* draw text */
imlib_context_set_color(0, 0, 0, 255);
imlib_text_draw(tw+1, th+1, cur_ic->text.c_str());
imlib_context_set_color(255, 255, 255, 255);

In the file ./src/core/SuperBar.cc This function [imlib_context_set_color] looks familiar and the values are R,G,B,A for red-green-blue-and transparency respectively. Also I knew that the color white is all colors combined and usually has the highest values: (HEX) #ffffff or in our case or 256 bit (RGB) (0-255), 255-255-255. Black is the lowest: (HEX) #000000 or 0,0,0 in 256 bit RGB. Then I looked up the RGB set for the color yellow to match my theme and found that it was 255,255,0 and HEX #ffff00. I changed the bottom function (since they are just layers – i figured the bottom layer was for the shadow) and ran:

make clean && make uninstall && make && make install

It worked! The first function [imlib_context_set_color] makes the color of the drop shadow, which is black. So then I decided to make the line unique by removing the spaces between the commas and integers like so:

imlib_context_set_color(255,255,255,255);

which obviously didn’t break the function and then wrote a simple sed script to change the color on the fly -pre-compilation:

#!/bin/bash
sed -i -r -e "s/(imlib_context_set_color\()[0-9]+,[0-9]+,[0-9]+,[0-9]+\)/\1$1,$2,$3,$4\)/" src/core/SuperBar.cc

Now we can just look up the color code in a chart like this one: http://www.tayloredmktg.com/rgb/ and pass the values ot the script like so:

./colorchange.sh 255 255 0 255

The lower the last number, the more transparent the text color will be, but make sure you match it with the shadow!

~Douglas

Disabling SSH in inetd for WEAKERTH4N

Wednesday, March 13th, 2013

dragon brought to my attention that I accidentally left ssh running on port 23. To stop it, please open the file:

vim /etc/inetd.conf

and edit the following light blue line:

to have a “#” pound symbol in front of the line to make it just like the rest of them – essentially commenting this out.

Then we need to restart inetd

/etc/init.d/openbsd-inetd restart

It will be disabled in the upcoming BETA 2 release this weekend.

~Douglas

Aptitude Fix and Java Install

Tuesday, March 12th, 2013

I am not really sure where the database for dpkg went during development, but hey – that’s what Linux is all about right?: fixing bugs and solving puzzles. So I spent most of my evening last night and came up with a super script that fixes the entire issue for those who want to use aptitide (apt-get, apt-cache, etc)

To solve the issue, run these commands from the command prompt:

wget http://weaknetlabs.com/linux/flyswatter/scripts/aptitudefix.sh
chmod +x aptitudefix.sh
./aptitudefix.sh

This will rebuild most of the database and allow for apt-cache searches again. If the entry is not in the DB files it will be added and you may see a lot of extra lines during an apt-get install

Java

java is about 100MB or so and was trimmed from the BETA ISO, but it is required for playing with the cute Metasploit “Armitage” gui interface and the spectrum analyzer software for the Ubiquiti Airview.

Once we have done the aptitude fix above, we can now do

apt-get install openjdk-6-jre

~Douglas.

Installing WEAKERTH4N BLUE GHOST on USB Drives with Unetbootin

Monday, March 11th, 2013

A few people have had issues booting wt3.6 using Unetbootin, so here I will show you how I install WT4 BLUE GHOST on a USB drive for booting a live session. First we need to put in the USB drive and format it. We will be using Linux to do this. WEAKERTH4N is not a “beginner’s” Linux and should only be used by those with experience. I have trimmed a lot of the fat by choosing professional tools and chose terminal or command line tools over GUI tools. Also, this method below will delete all data from your disk.

1. push the drive into the computer and open a terminal. Type
dmesg
and you should see messages about the new drive and it’s label. e.g. “sda” or “sdb” etc.
2. Now we need to format the disk. For our example, we are going to use “sda” for our example.
fdisk /dev/sda
Use “p” to print the table to the screen.
Use “d” to remove all partitions one by one.
Use “n” to create a new partition.
Use “p” to make that partition a “primary” partition.
Choose the size in cylinders. I usually just use the whole disk, but if you wanna make a partition to write changes to, you will have to specify so here and make the Unetbootin partition smaller.
Use “t” to change the type of the new partition to “b” which is MSDOS
Finally choose “w” to write the new partition table and exit.

3. Next we need to make a filesystem.
mkfs.msdos /dev/sda1
4. Then mount the drive.
mkdir /mnt/usb/
mount /dev/sda1 /mnt/usb/

5. Now we are ready to use Unetbootin:
Unetbootin

Follow the prompts to choose the ISO and then the device at the very bottom.

~Douglas.