First Hackspace meet!!!!

Posted: July 14, 2010 in Announcements

Well the first Hackerspace meet, whilst humble in size and facilities, went very well. We had six attendees at its peak, and a variety of things were shown. Noorbeast and his son demonstrated an electronic whiteboard, utilizing a projector, wiimote and an infrared pointer. Hampered somewhat by the ability to find a good mounting position for the wiimote, they still managed to show it in action, and we even did a little doodling in GIMP, my kids thought it was great!

Noorbeast also showed me some code he was working on that allowed the overlay of images and text editing via a web browser than could be used to creating custom images for various uses. It’s only early days in its development but is showing a lot of promise. His son did a bit of PSX emulation up on the projector, and is something I plan to give a good workout in the future! Another rather amazing game (windows based but forgivable in this case) was a software package Noorbeast brought along. Using biometric feedback via 3 sensors attached to the fingers, you can use your “state” to control elements in the game. It really is a great thing to try out and quite easily demonstrates the power of calm and also of excited thought patterns.

After some hardware troubles involving a faulty stick of RAM, and some assistance, I managed to get MythTV with XBMC as the front end running on an old P4 I had sitting in the cupboard. As per Noorbeasts advice I also setup the Shepherd scraper for TV guide information. I also mapped the media server from my NAS box to it and the new creation now lives in the bedroom, letting me enjoy Star Trek on a nightly basis :D .

Lastly I managed to install the Metasploit network on my n900. Whilst I have not had to play with it, I plan to in the future and will also be putting up a guide to install it on the n900 device.

Due to a dying GPU, sadly there was no real chance to get into any gaming, but I plan to remedy that at the next meet.

All in all I had a great time and learnt some handy tricks, and I look forward to the return of the attendees of the first one so we can help it grow and evolve further. Next time I promise to remember to take some photos!

What’s your poison?

Posted: July 5, 2010 in Random

Ok, so what do we use in our everyday adventures on our machines? Feel free to specify what distro or multiple machines in the comments section.

A trip down memory lane

Posted: July 2, 2010 in Random

Many of us remember our first use of a computer, and have fond memories of those late nights hacking away at the keyboard. One of the things I really loved was dialling into BBS machines. It was amazing, playing games, swapping software, chatting to people we’d met on there. It was a massive part of my life and something I well and truly loved doing. Imagine my surprise when I found out a documentary had been made about the BBS by Jason Scott, creator of www.textfiles.com

In his wisdom, he released this under the Creative Comments license, whick I applaud. It consists of 8 episodes with interviews with many of the biggest influences in the BBS world. Each episode addresses a different facet of the phenomenon. It brough back many memories for me, and reminded me of things I had totally forgotten about, liek ANSI art packs. I will make it available for those attending meets at the hackspace and our local LUG meets.

I totally reccommend this for anyone who was ever involved in the BBS scene all those years ago.

The official webpage for the series is http://www.bbsdocumentary.com/

DISCLAIMER: The Author in no way advocates the cracking of WiFi encryption or connecting to private networks without permission. Mapping of wireless access points does not violate any laws, though I advise people to verify this in their particular location.

Kismet is a readily available application that in it’s most basic form allow you to scan your surrounding area for WiFi access points. More information on Kismet and it’s function can be found at http://www.kismetwireless.net/

What makes Kismet really interesting is that when used to scan on a GPS enable device, it will also log GPS co-ordinates of every access point it detects. This data, once converted, can be opened using Google earth to overlay your detected access points onto Google’s satellite imagery. The Data can include:

1. SSID
2. BSSID/MAC
3. Type
4. Channel
5. Encryption
6. GPS Coordinates

I have tested this on my N900 and can confirm that it does indeed work. Accuracy can be affected by the speed of your travel whilst scanning and GPS signal. In order to view this data there are a couple of steps.

1. Kismet will create a log file with the .netxml extension. This is the file that contains all the data we need for Google Earth.

2. I use a python script written by Patrick Salecker to convert my logfile. Copy the text from the code below into your favourite text editor and save it as netxml2kml.py


#!/usr/bin/env python
# coding=utf-8
#
# Converts netxml files from Kismet Newcore into KML or KMZ files for Google Earth
#
# Author: Patrick Salecker
# URL: http://www.salecker.org/software/netxml2kml/en
# Last modified: 20.12.2009

import os
import time
import zipfile

import xml.parsers.expat
import optparse

class WirelessNetwork:
def __init__(self,type,firsttime,lasttime):
self.type=type
self.fisttime=firsttime
self.lasttime=lasttime
self.bssid=”"
self.manuf=”"
self.ssid=[]
self.freqmhz={}
self.maxrate=0
self.maxseenrate=0
self.packets={}
self.snr={} # Signal-to-noise ratio
self.datasize=0
self.channel=0
self.carrier=”"
self.bsstimestamp=0
self.gps={}
self.ipaddress={}

def get_from_ssid(self,key):
result=[]
for ssid in self.ssid:
if key in ssid and ssid[key]!=”":
if type(ssid[key])!=type({}):
return ssid[key]
else:
for bla in ssid[key]:
if bla not in result:
result+=[bla,]
if len(result)>0:
return result
else:
return “”

def update(self,new):
“”"Update a network
Compare a existing network with a new and update the existing
“”"
if len(self.gps)==0 and len(new.gps)>0:
self.gps=new.gps
return True

KML_PLACEMARK=”"”
#%s
%s,%s

MAC: %s
Type: %s
Channel: %s
Encryption: %s
Last time: %s]]>
“”"

KML_FOLDER = “”"

%s: %s APs
0.5
“)

http://bla.wsf23.net/img/wd/%s.gif

%s

“”"

class netxml:
def __init__(self):
self.networks={}
self.outputname=”"
self.target=None

def main(self):
usage=self.main_usage()
parser = optparse.OptionParser(usage)
parser.add_option(“-o”, dest=”outputname”,
help=”Filename without extension”)
parser.add_option(“–kml”, dest=”kml”, action=”store_true”,
help=”Create a KML file for Google Earth .kml”)
parser.add_option(“–kmz”, dest=”kmz”, action=”store_true”,
help=”Create a KMZ file for Google Earth .kmz”)

(options, args) = parser.parse_args()

# Input
if len(args)>0:
for filename in args:
if os.path.isdir(filename):
self.parse_dir(filename)
elif os.path.isfile(filename):
self.parse(filename)
else:
print “Invalid name: %s”%filename
if options.outputname==None:
print “Output name not defined, try ‘-h’”
else:
self.outputname=options.outputname
print “Outputfile: %s.*” % self.outputname

print “”

# Output
if len(self.networks)>0:
if self.outputname!=”":
if options.kml is True:
self.output_kml()
if options.kmz is True:
self.output_kml(kmz=True)
else:
print “No networks”

def main_usage(self):
return “”"
python netxml [options] [file1] [file2] [dir1] [dir2] [...]
./netxml [options] [dir1] [dir2] [file1] [file2] [...]

Example:
python netxml.py –kmz –kml -o today somefile.netxml /mydir”"”

def parse_dir(self,parsedir):
“”"Parse all files in a directory
“”"
print “Parse .netxml files in Directory:”,parsedir
starttime=time.time()
files=0
if not parsedir.endswith(os.sep):
parsedir+=os.sep
for filename in os.listdir(parsedir):
if os.path.splitext(filename)[1]==”.netxml”:
self.parse(parsedir + filename)
files+=1

print “Directory done, %s sec, %s files” % (
round(time.time()-starttime,2),files)

def parse(self,filename):
“”"Parse a netxml file generated by Kismet Newcore
“”"

self.parser={
“update”:0,
“new”:0,
“laststart”:”",
“parents”:[],
“wn”:None,
“ssid”:None
}

p = xml.parsers.expat.ParserCreate()
p.buffer_text=True #avoid chunked data
p.returns_unicode=False #disabled Unicode support is much faster
p.StartElementHandler = self.parse_start_element
p.EndElementHandler = self.parse_end_element
p.CharacterDataHandler = self.parse_char_data
if os.path.isfile(filename):
p.ParseFile(open(filename))
else:
print “Parser: filename is not a file:” % filename

print “Parser: %s, %s new, %s old” % (
filename,self.parser["new"],self.parser["update"])

def parse_start_element(self,name, attrs):
“”"
“”"
#print ‘Start element:’, name, attrs
if name==”wireless-network”:
self.parser["wn"]=WirelessNetwork(
attrs["type"],
attrs["first-time"],
attrs["last-time"])
elif name==”essid” and ‘cloaked’ in attrs:
self.parser["ssid"]['cloaked']=attrs['cloaked']
elif name==”SSID”:
self.parser["ssid"]={“encryption”:{}}

self.parser["parents"].insert(0,self.parser["laststart"])
self.parser["laststart"]=name

def parse_end_element(self,name):
“”"
“”"
#print ‘End element:’, name
if name==”wireless-network”:
if self.parser["wn"].bssid in self.networks:
self.networks[self.parser["wn"].bssid].update(self.parser["wn"])
self.parser["update"]+=1
else:
self.networks[self.parser["wn"].bssid]=self.parser["wn"]
self.parser["new"]+=1
elif name==”SSID”:
if len(self.parser["ssid"])>0 and “type” in self.parser["ssid"]:
if self.parser["parents"][0]==”wireless-network”:
self.parser["wn"].ssid.append(self.parser["ssid"])
del self.parser["ssid"]

self.parser["laststart"]=self.parser["parents"].pop(0)

def parse_char_data(self,data):
“”"data
“”"
if data.strip()==”":
return

if self.parser["parents"][0]==”SSID”:
if self.parser["laststart"]==”encryption”:
self.parser["ssid"]["encryption"][data]=True
elif self.parser["laststart"] in(“type”,”ssid”,”essid”,”max-rate”,”packets”,”beaconrate”,”info”):
self.parser["ssid"][self.parser["laststart"]]=data
elif self.parser["parents"][1]==”wireless-network”:
if self.parser["parents"][0]==”gps-info”:
self.parser["wn"].gps[self.parser["laststart"]]=float(data)
“”"elif self.parser["parents"][0]==”packets”:
self.parser["wn"].packets[self.parser["laststart"]]=data
elif self.parser["parents"][0]==”snr-info”:
self.parser["wn"].snr[self.parser["laststart"]]=data
elif self.parser["parents"][0]==”ip-address”:
self.parser["wn"].ipaddress[self.parser["laststart"]]=data”"”
elif self.parser["parents"][0]==”wireless-network”:
if self.parser["laststart"]==”BSSID”:
self.parser["wn"].bssid=data
elif self.parser["laststart"]==”channel”:
self.parser["wn"].channel=int(data)
“”"elif self.parser["laststart"]==”freqmhz”:
self.parser["wn"].freqmhz[data]=True
elif self.parser["laststart"]==”carrier”:
self.parser["wn"].carrier=data
elif self.parser["laststart"]==”maxseenrate”:
self.parser["wn"].maxseenrate=data
elif self.parser["laststart"]==”manuf”:
self.parser["wn"].manuf=data
elif self.parser["laststart"]==”bsstimestamp”:
self.parser["wn"].bsstimestamp=data
elif self.parser["laststart"]==”datasize”:
self.parser["wn"].datasize=data”"”

def output_kml(self,kmz=False):
“”"Output KML for Google Earth
“”"
print “%s export…” % (“KML” if not kmz else “KMZ”)
#starttime=time.time()

if kmz is True:
target=CreateKMZ(self.outputname)
else:
target=CreateKML(self.outputname)

target.add(“<?xml version=’1.0′ encoding=’UTF-8′?>\r\n”)
target.add(“\r\n”)
target.add(“\r\n”)
target.add(“netxml2kml\r\n”)
target.add(“1″)

count={“WPA”:0,”WEP”:0,”None”:0,”Other”:0}
folders=self.output_kml_fill_folders(count)

for crypt in (“WPA”,”WEP”,”None”,”Other”):
if crypt==”WPA”:
pic=”WPA”
elif crypt==”WEP”:
pic=”WEP”
else:
pic=”Open”

target.add(KML_FOLDER %(
crypt,
count[crypt],
crypt,
pic,
“”.join(folders[crypt])
))

print “%s\t%s” % (crypt,count[crypt])

target.add(“\r\n\r\n”)

target.close()

print “Done. %s networks” % sum(count.values())
#round(time.time()-starttime,2)

def output_kml_fill_folders(self,count):
folders={“WPA”:[],”WEP”:[],”None”:[],”Other”:[]}
colors={“WPA”:”red”,”WEP”:”orange”,”None”:”green”,”Other”:”grey”}
for net in self.networks:
wn=self.networks[net]
if len(wn.gps)==0:
continue

encryption=wn.get_from_ssid(‘encryption’)
crypt=self.categorize_encryption(encryption)
if len(encryption)!=0:
encryption.sort(reverse=True)
encryption=” “.join(encryption)

folders[crypt].append(KML_PLACEMARK %(
crypt,wn.gps['avg-lon'],wn.gps['avg-lat'],
wn.get_from_ssid(‘essid’),wn.bssid,wn.type,
wn.channel,colors[crypt],encryption,wn.lasttime
))
count[crypt]+=1

return folders

def categorize_encryption(self,encryption):
for c in encryption:
if c.startswith(“WPA”):
return “WPA”

if “WEP” in encryption:
return “WEP”
elif “None” in encryption:
return “None”
else:
return “Other”

class CreateKML:
“”"Write the KML data direct into a file
“”"
def __init__(self,outputname):
self.file=open(“%s.kml” % outputname, ‘w’)

def add(self,data):
self.file.write(data)

def close(self):
self.file.close()

class CreateKMZ:
“”"Store the KML data in a list and write it into a zipfile in close()
“”"
def __init__(self,outputname):
self.data=[]
self.zip=zipfile.ZipFile(“%s.kmz” % outputname, “w”)

def add(self,data):
self.data.append(data)

def close(self):
zinfo = zipfile.ZipInfo(“netxml2kml.kml”)
zinfo.compress_type = zipfile.ZIP_DEFLATED
self.zip.writestr(zinfo,”".join(self.data))
self.zip.close()

if __name__ == “__main__”:
converter=netxml()
converter.main()

3.Make the script executable by navigating to the folder in which you have stored the script and in the terminal use the command:

sudo chmod -x netxml2kml.py

4. Now to make things simple, I copy our log file into the same directory as the Python script. You can then enter the following command:

python netxml.py –kmz –kml -o FILENAME somefile.netxml /mydir

This will create a FILENAME.kmz and a FILENAME.kml file in the specified directory. Either of these files can be loaded into Google Eart by choosing Open from the file menu.

KMZ files can be a combination of multiple KML files, and this article will get updated in the future once I am happy with a solution for doing so.

Further information on the Python script used can be located at Patrick Saleckers website at http://www.salecker.org/software/netxml2kml/en

Patrick also supplies a sample .netxml file for you to try out with his script.

Feel free to contact me in IRC or via the mailing list for any questions.

Enjoy!

Now many of us know how Hollywood and the media have taken the term Hacker and twisted it be a buzzword to generate hysteria, so rather than waffle on with a rant that has been posted the width and breadth of the Internet, I thought I would share a little excerpt I found in the Jargon file (The current version is The Jargon file 4.4.7 )

It is a letter that wild and woolly Richard Stallman sent to the Wall Street Journal, protested it’s misuse of the word hacker. Normally, whilst agreeing with RMS in principle, find him highly annoying and very extreme in his views on free software, but I thought this was great.

This letter is not meant for publication, although you can publish it if you wish. It is meant specifically for you, the editor, not the public.

I am a hacker. That is to say, I enjoy playing with computers — working with, learning about, and writing clever computer programs. I am not a cracker; I don’t make a practice of breaking computer security.

There’s nothing shameful about the hacking I do. But when I tell people I am a hacker, people think I’m admitting something naughty — because newspapers such as yours misuse the word “hacker”, giving the impression that it means “security breaker” and nothing else. You are giving hackers a bad name.

The saddest thing is that this problem is perpetuated deliberately. Your reporters know the difference between “hacker” and “security breaker”. They know how to make the distinction, but you don’t let them! You insist on using “hacker” pejoratively. When reporters try to use another word, you change it. When reporters try to explain the other meanings, you cut it.

Of course, you have a reason. You say that readers have become used to your insulting usage of “hacker”, so that you cannot change it now. Well, you can’t undo past mistakes today; but that is no excuse to repeat them tomorrow.

If I were what you call a “hacker”, at this point I would threaten to crack your computer and crash it. But I am a hacker, not a cracker. I don’t do that kind of thing! I have enough computers to play with at home and at work; I don’t need yours. Besides, it’s not my way to respond to insults with violence. My response is this letter.

You owe hackers an apology; but more than that, you owe us ordinary respect.

Well said.

An Open Community Lab

Posted: June 28, 2010 in Open Source

The term Hackerspace may cause confusion or maybe have some negative connotations because of the misunderstood term of Hacker.

An Open Community Lab is just that. People gathering to contribute, test, demonstrate or just play with their neat gadgets, toys and computers. It’s a little haven that gets people out of the house and to mix with others in a friendly and social environment.

As numbers increase, there is the ability to come up with a group project, where everyone can work and contribute something, and together come up with a creation the whole team can be proud of. It is my hope that in the little retreat I am setting up, is that it is approached with an Open Source philosophy, and that things created there be shared with the outside world for the benefit of all.

First hackerspace meet!

Posted: June 27, 2010 in Announcements

The first meet is proposed for the the weekend 10th-11th of July. Things may not be all that perfect being the first one but hopefully we can all come up with ideas to make subsequent meets better. If there is anything you would like to see there or any activity you would like to try, leave your suggestions in the comments and I’ll see what can be organised. See you there!

Nerds, we don’t fit in most of the time. We see what most people do not, and instead of shying away from it, we dive in headfirst. Once upon a time I was a PC gamer, attending two day LANs. The mentality of most gamers, and my ever growing annoyance with the Windows operating system caused me to switch to Linux and all but abandon PC gaming. Luckily, I found a Linux Users Group in my area ( http://cqlug.linux.org.au/ ) and was soon in the midst of nerds and geeks once again. it’s a great group that meet once a month, but I have come to the conclusion that is wasn’t enough for me!

So what’s the solution?

A Hackerspace! A place for us to congregate and hack code, play with gadgets and generally just nerd out! At the moment I am prepping the area under my house and the events will be invite only and frequency will probably be at random, but I am very excited and look forward to getting it off the ground!