Friday, September 23, 2011

Debranding BackTrack 5

I love backtrack 5, so much so I want to customize it with my own wallpapers and splash screens and such. Below I will illustrate what you need to know to change:
1. The bootsplash image (the text only screen on top of the background, it will be the first one that comes up)
2. The plymouth image (the image that flashes on the screen for a few seconds before going back to the bootsplash image)
3. The wallpaper image (simplest to change, its the wallpaper on the desktop)

Firstly, the bootsplash image:
The bootsplash image is by far the hardest to modify because it takes quite a few steps, although is simple in retrospect. BT5 uses a utility called "bootsplash" to generate the image that is behind the superimposed text window when you first boot up. This is the screen where you initially log in with root:toor login, the same screen where you type startx to put into the gui.
Bootsplash imagefiles are basically the original image with added metadata tagged onto it. This metadata is placed within the bootsplash imagefile using the splash utility along with a simple text config file. The current imagefile is located at /opt/bootsplash/bootsplash. In order to modify the bootsplash image, you must regenerate this file. You do this using the bootsplash utility "splash". This utility comes with the installation of the bootsplash utilities archive located below:

http://www.bootsplash.org/Userspace

Download, extract, and compile the utilities into some folder. Navigate to this folder and run "./splash" - you should recieve the following output:

root@bt:~/temp/bootsplash-3.0.7/Utilities# ./splash
Usage: ./splash -s [-u unit] -n [cfgfile]

This means it should be working fine. So, like I said before, this splash utility requires one file as input, the config file (i will describe it later). This config file contains the metadata along with the location of the image to use.
----------------------
So lets start with the whole point of this, go get your jpg image you want to use as the background. got it? good. NOTE* the instructions im giving expect your file to be 1024x768 and 96DPI. Now that you have your jpg file somewhere you need to create a splash config file to go along with it. I have pasted my file below:

# config file version
version=3

# should the picture be displayed?
state=1

# fgcolor is the text forground color.
# bgcolor is the text background (i.e. transparent) color.
fgcolor=7
bgcolor=0

# (tx, ty) are the (x, y) coordinates of the text window in pixels.
# tw/th is the width/height of the text window in pixels.
tx=80
ty=140
tw=865
th=560

# name of the picture file (full path recommended)
jpeg=/root/temp/tw/bootsplash.jpg
silentjpeg=/root/temp/tw/bootsplash.jpg
progress_enable=0
overpaintok=1

So as you can see above, you have to specify the path of the jpg along with the dimensions of the text box that the console output will be placed in (the dimensions MUST be within the limits of the image otherwise it wont work). Ok so now you have the config pointing to the image. now lets pass it to the splash utility to generate our bootsplash imagefile.

./splash -s -f /root/temp/tw/bootsplash-1024x768.cfg > /opt/bootsplash/bootsplash.fancy
cp /opt/bootsplash/bootsplash /opt/bootsplash/bootsplash.old-bt5
cp /opt/bootsplash/bootsplash.fancy /opt/bootsplash/bootsplash

The above commands generate the bootsplash imagefile, place it in /opt/bootsplash, backup the old one, and copy in the new one. This way, if you need to go back all you have to do is copy back the old file and continue.

Now you run "fix-splash" to copy the new file into initrd. Fix splash is a bash script that the bt5 guys seem to have included to fix and old issue with splash fucking up for some reason.

now reboot and enjoy :D
--------------------------------
Changing the Plymouth image:

This process is simpler. First, backup the old plymouth bt5 splash:
"cp /lib/plymouth/themes/simple/bt5_1024x768.png /lib/plymouth/themes/simple/bt5_1024x768.png.backup"
Now what I did was open the bt5 plymouth image in gimp, paste my new image over it, and save it. I wasnt sure if there was any retarded file issues I had to deal with so i figured I wouldnt try to find out...
Now run "update-alternatives --config default.plymouth" and then "update-initramfs -u", reboot and everything will look fucked up. log into root, run "fix-splash" like before, reboot and now it should be fixed.
-------------------------------
Changing the wallpaper image:

This is the simplest:
"gconftool-2 --type string --set /desktop/gnome/background/picture_filename /root/Desktop/wp.jpg"

bam. that should be an instant change.

have fun, and if anything doesnt work try google first, then message me ;D

Thursday, September 22, 2011

Psychological Porno

I have always had spouts of ideas/revelations/epiphanies since i can remember, and they always were gone once i had them. Only recently have i decided to start recording said ideas. Its simple, I downloaded a voice recorder app on my phone, and when I get an awesome new invention idea, or a philosophical idea, or when i start ranting, I hit the record button.

There are several benefits to doing this:
1. You can hear yourself (effectively) from an outside perspective once enough time has passed. This is awesome since you cant remember exactly what you were thinking at that point, so you hear yourself the exact way others do. This is a very rare experience that i believe would benefit anyone.

2. You have a record of your ideas for the future, immortalized in digital media, you can copy and share that shit anywhere. Although, I would be very careful who you share your ideas and secrets with. People could exploit the things you hold dearest, and that, could seriously fuck with you.

3. The third is what I like to call psychological porno. I call it that because playing back your hopes/dreams/realizations/etc after a long span of time really brings you back to the person you wish to be. Everyone strays from that person from time to time, but its important for us to be able to realize what path we wanted to take in the first place.

Thursday, September 8, 2011

GNU screen and osx mouse scrolling

I use a mac. I use screen. I want mac mouse scrolling in screen. This is how I do it:

My main gripe with screen is its scrollback buffer. As a pentester, the output i receive is obviously incredibly important, so an easy way to view it is imperative. Apparently there is a way to hack mouse scrolling into terminal. Basically it utilizes a plugin written for a scripting agent that interfaces into terminal.app.

1. install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php
2. install MouseTerm: https://bitheap.org/mouseterm/
3. restart terminal, make sure "send mouse events" is checked in the "shell" menu option.
4. start screen
5. ???
6. profit

Basically its a plugin that converts the scroll up movement of your mouse/touchpad to up/down arrow keys and sends that to the terminal. This effectively allow you to quickly scroll through screens scrollback buffer quickly by flicking your fingers.

awwwww yeahhhhh