dereenigne.org

reverse engineered

Skype Debian Squeeze x86_64

Officially, Skype is not supported on 64-bit Debian. In reality, it works perfectly. If you try to install the official .deb package, dpkg will give you an error: root@lambda:~# dpkg -i skype-debian_2.1.0.81-1_i386.deb dpkg: error processing skype-debian_2.1.0.81-1_i386.deb (--install): package architecture (i386) does not match system (amd64) Errors were encountered while processing: skype-debian_2.1.0.81-1_i386.deb This package works fine if the architecture check is overridden. wget http://www.skype.com/go/getskype-linux-deb root@lambda:~# dpkg -i --force-architecture getskype-linux-deb Read more →

Mirror FTP

I recently decided to take mirror an old website that I had running. The hosting plan only offered ftp, and so, I couldn’t get shell access to tar and scp it. Next best thing was to mirror it using lftp. The following command logs into the root FTP directory and mirrors every file recursively. lftp -e mirror -u username,password ftp.example.com Read more →

Axis 207 IP Camera Recording

While the Axis 207 IP camera provides MPEG4 video output, the MPEG4 format is a bit obscure, and not handled by many media players. This makes recording the output difficult. Fortunately, VLC is capable of both playing and recording this format. The following cron line uses VLC to record hourly chunks of video from a Axis 207 camera with IP address 10.0.0.1, and store them in /tmp/Axis207. 0 * * * * /usr/bin/vlc rtsp://10. Read more →

Reducing ext2/3/4 Overhead

If you are using Ext2/3/4 as a filesystem, you might not be aware that the system reserves a certain percentage of disk for root processes by default. While this is normally useful on boot drives, it is a major hindrance on storage drives. Debian reserves 5% by default. On a 1 TB drive, this equates to approximately 47 GB! This can percentage can be altered using tune2fs and the -m argument, followed by the percentage of blocks you wish to reserve. Read more →

Arduino Float to String

If you have ever tried to use sprintf() on an Arduino to convert from a float to a string, you will notice it doesn’t work. sprintf(buf,"%f", floatvar); The above function will most likely return a “?” to your char buffer. If you google around, you’ll see various functions that people have written to overcome this, but all of them seem broken in one way or another. The alternative is to use dtostrf(), a standard avr-libc function. Read more →

ngrep Network Traffic Snooping

ngrep is a powerful tool which enables network administrators to view packets travelling across the wire in real time. This is a useful item for both security audits and reverse engineering. By running ngrep on router level devices, it is possible to see where closed source devices such as Playstations and Wiis are phoning home for updates. Below is a sample command run on my router to view all traffic on interface br0, travelling to or from host 192. Read more →

Batch Image Conversion

If you have a batch image conversion to do, ImageMagick is your friend. It provides commandline tools for manipulating images. I recently had to convert about 200 .svg images to .png images, while maintaining the alpha channel. Rather than doing this by hand, it can be done in a single command, using mogrify, one of the ImageMagick utilities. mogrify -background none -format png *.svg Have a look here for a list of the other arguments that can be passed to mogrify. Read more →

iptables Port Redirection

On a Unix system, TCP and UDP between 1 and 1023 require root privileges. This means that any program wishing to bind to these ports must be run as root. While this is fine for trusted programs such as Apache and OpenSSH, I’d be weary of letting other programs run as root. This obviously means that you cannot use the standard ports, such as 80 for HTTP, 21 for FTP etc. Read more →

SSH Avoid Host Key Verification

SSH is great for providing security over unprotected networks, but sometimes the security measures can just get in the way. When dealing with embedded devices or virtual machines, rolling out a new firmware/disk image will result in the SSH host key changing, resulting in the warning below. user@host:~$ ssh remotehost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! Read more →

Axis 207 Enable Telnet

The Axis 207 IP camera that I had been using for the snowcam is actually a fully featured Linux system. To enable console access, you need to use the webinterface to edit the system init table. http://192.168.1.10/admin-bin/editcgi.cgi?file=/etc/inittab Replace 192.168.1.10 with the IP address of the camera. Edit: # Uncomment the following line to start the telnet server. # tnet:35:once:/usr/sbin/telnetd So that it reads: # Uncomment the following line to start the telnet server. Read more →