“re-sized bt5.img for nokia n900″
by zitstif on May.12, 2012, under Posts
Due to US Federal prosecutors, if you try to follow my instructions from this post:
http://zitstif.no-ip.org/?p=484
You will not be able to. Megaupload has been taken down. Along with copyright infringing materials, legitimate non-copyright infringing materials like the re-sized bt5.img are no longer accessible.
Luckily, I still had the re-sized bt5.img and I have uploaded it to archive.org:
http://ia601203.us.archive.org/0/items/Backtrack5ArmImgFile/bt5.7z
Md5sum: 4f378f01b35b598d0b7f7b8177499cb2
Thanks for pointing out the fact that megaupload is no longer up Alec!
Netcat without Netcat – (Hak5)
by zitstif on Mar.29, 2012, under Posts, Videos
Kolmogorov Complexity, Natural Language Programming and the Bash shell
by zitstif on Jan.14, 2012, under Code, Posts
The following post superficially applies the concepts of Kolmogorov complexity of an object and natural language programming using the bash shell. Part of the inspiration for this post came from this video: http://www.youtube.com/watch?v=KyB13PD-UME
In this post we will be treating strings as objects in a similar sense of Kolmogorov complexity. Then we will apply an alias name or function name to the object which then the alias/function name can be perceived as a natural language sentence.
Take the following object:
sudo nmap -sP -n -T4 $(netstat -rn | awk ‘{print $2}’ | egrep ‘[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}’ | fgrep -v “0.0.0.0″ | sed -e ’s/\([0-9]\)\{1,3\}$/1-254/g’)
To individuals who are not familiar with the bash shell or bash shell programming, this object does not make a whole lot of sense. What does it do? What does it mean? Why is this one-liner algorithm useful to some individuals?
For those of who you aren’t sure, this one-liner algorithm is used for ping sweeping your local subnet based upon the gateway’s IP address. So if your gateway is 192.168.1.1 then when the bash shell expands and processes the sub-shell variable $(netstat -rn | awk ‘{print $2}’ | egrep ‘[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}’ | fgrep -v “0.0.0.0″ | sed -e ’s/\([0-9]\)\{1,3\}$/1-254/g’‘), it would result with 192.168.1.1-254. Lastly, the string would result with sudo nmap -sP -n -T4 192.168.1.1-254.
To take the time to type out this 196 character object each time you connect to a network that you’re exploring, would be extremely tedious and time consuming. Ergo to save an individual some time and keystrokes, this is where we will apply the ‘alias’ function that is built into the bash shell:
alias PingSweepLocalSubnet=”sudo nmap -sP -n -T4 $(netstat -rn | awk ‘{print $2}’ | egrep ‘[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}’ | fgrep -v “0.0.0.0″ | sed -e ’s/\([0-9]\)\{1,3\}$/1-254/g’)”
Here the 20 character alias PingSweepLocalSubnet saves the end user 176 characters to type and makes more sense depending on if the user is familiar with networking terminologies. Granted this may not be, “the shortest description of this object” and the proper simplifying algorithm according to Kolmogorov complexity method, but this is where the idea of natural language programming is applied. With this object, if we use the Kolmogorov complexity concept, is nearly incompressible. I wanted this alias to be time saving and to be almost a form of natural language programming.
We must also remember that we do not necessarily need to use the ‘alias’ function from the bash shell. We can also achieve the same result by using ‘function’ from bash shell:
function PingSweepLocalSubnet()
{
sudo nmap -sP -n -T4 $(netstat -rn | awk ‘{print $2}’ | egrep ‘[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}’ | fgrep -v “0.0.0.0″ | sed -e ’s/\([0-9]\)\{1,3\}$/1-254/g’);
}
In turn end users may want to use function assignments rather than aliases. Aliases are limited and are simply string substitutions. For further reading on using aliases or functions take a look at: http://linuxgazette.net/issue53/eyler.html Whether or not the end user decides to use ‘alias’ or ‘function’ is subjective to the user.
A Note on Updating Weaponized Nokia N900s
by zitstif on Dec.17, 2011, under Code, Posts
I wanted to make this post to save time and headaches for people who own ‘weaponized’ Nokia N900s.
If you regularly update your Nokia N900 by doing (as root):
apt-get update && apt-get upgrade -y
I have ran into some issues with some of the newer packages.
Firstly, the newest beta version of nmap (5.59BETA1_armel) appears to be buggy enough to the point where it’s almost unusable.
Running this:
nmap -sS -P0 -vv www.google.com -p 80
Yields:
Starting Nmap 5.59BETA1 (http://nmap.org) at 2011-12-17 21:14 EST
Warning Hostname www.google.com resolves to 6 IPs. Using 74.125.45.147
route_dst_netlink: can’t find interface “wlan0″
Secondly, subversion (svn) gets completely broken due to a library compatibility issue:
svn -h
Segmentation fault
There has been discussion on this: http://talk.maemo.org/showthread.php?p=970467
Having svn broken really stinks, because then I am not able to update Metasploit. Who in the hell wants to run an outdated version of Metasploit? (I imagine there are some people..)
To work around this for the time being I have crafted the following shell script:
#!/bin/bash
if [ ${#} -lt 1 ]
then
echo "Usage: "
echo "./update.sh normal #This just does a normal update";
echo "./update.sh modded #This will do a normal update and then downgrade libaprutil1, libapr1 and nmap so that they work";
exit 1;
fi
if echo ${1} | egrep "normal" > /dev/null;
then
apt-get update;
apt-get upgrade -y;
exit 0;
elif echo ${1} | egrep "modded" > /dev/null;
then
apt-get update;
apt-get upgrade -y;
apt-get install nmap=5.50-2 libaprutil1=1.3.9-2 libapr1=1.4.2-1 --force-yes -y;
apt-get clean && apt-get autoclean;
exit 0;
else
echo "I don't know what you are trying to do.." #Thanks Arc
exit 2;
fi
http://zitstif.no-ip.org/update.txt
SHA1 (update.txt) = d83306d18a146a54a38ea236e3a236b4955bb81b
For the time being if you’re in a similar case like me, you’ll have to use this shell script (wget http://zitstif.no-ip.org/update.sh && chmod +x update.sh && ./update.sh modded).