Thursday 27 December 2012

Nexus 7 file transfer with Linux via USB

So getting a nexus 7 connected to your linux system and transferring files is a pain in the arse.

So here is the quick quick guide to doing it.

  1. Open a terminal
  2. Create a udev rules file for the Nexus 7 with it’s device id (18d1)
  3. sudo vim /etc/udev/rules.d/99-android.rules
  4. Paste the following contents into the, save and exit (ctrl+o, then ctrl+x):
  5. # Nexus 7
  6. SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
  7. Make the file executable (gotta love the security on Linux)
  8. sudo chmod +x /etc/udev/rules.d/99-android.rules
  9. Install the mtp libraries from the repos
  10. sudo apt-get install libmtp-common libmtp-runtime libmtp9 mtpfs mtp-tools
  11. Create a mount point for the Nexus 7 and make it accessable to all users
  12. sudo mkdir /media/nexus7
  13. sudo chmod 755 /media/nexus7
  14. Finally plug your Nexus 7 into an empty USB slot on your comptuer and run the following command on the terminal:
  15. sudo mtpfs -o allow_other /media/nexus7
  16. In a few seconds, the tablet should appear mounted as an external drive on your file browser.
  17. Note that these steps are applicable to all Debian based systems including Linux Mint
  18. When you are done moving files, unmount the mounted folder before unplugging the device.

  19. sudo umount /media/nexus7

Thursday 2 August 2012

Metasploit on Raspbian Raspberry Pi

So here is how I got metasploit running on the latest ( 2012-07-15-wheezy-raspbian) on my raspberry pi.

open a terminal and do:


sudo -s



apt-get install build-essential subversion ruby libruby irb rdoc libyaml-ruby libzlib-ruby libopenssl-ruby libdl-ruby libreadline-ruby libiconv-ruby rubygems sqlite3 libsqlite3-ruby libsqlite3-dev ruby1.9.1-dev libpcap-dev



svn co https://www.metasploit.com/svn/framework3/trunk/ metasploit
cd metasploit

svn up



cd external/pcaprub
sudo ruby extconf.rb && make && make install



msfconsole





Tuesday 17 July 2012

LMDE + XFCE (linux mint debian edition) - touchpad and wine issues (solved)

So I am trying out Linux Mint Debian Edition with XFCE - its awesome, but I have found a few niggles so far.

First up is WINE is impossible to install it seems.. what a ball ache..
so go here and use this old stable version .deb file
http://www.lamaresh.net/binary.php

Second was the synaptic touchpad didnt allow double tap to click or scrolling on the edge..
simple solution
 sudo vim /usr/share/X11/xorg.conf.d/50-synaptics.conf

and then add these lines
  Option "TapButton1" "1"
  Option "VertEdgeScroll" "1"

I shall add more solutions to issues I find over the next few weeks.

Monday 9 July 2012

I have failed to update this blog for some time... been very very busy with all kinds of things including setting up sh-hackspace.org.uk a surrey and hampshire hackspace!
Also trying to get a Geek Girls Group started in surrey and hampshire so if you know any women who would be interested please pass on my details @__freakyclown__ on twitter

I have finally cured all the electronic issues I had with my 3d printer and is as I write this sentence printing its first high quality print!


Tuesday 15 May 2012

3d printer mendel finished (ish)

So for the last few evenings I have been working like a slave to get this thing finished.

Saturday inspired by seeing two up and running, I have finally completed the building and wiring of the printer.. and this morning I added power \o/

I am hoping to get my first print this evening after work.



Tuesday 8 May 2012

3D printer update!

So I spent most of the bankholiday weekend building more of my 3d printer!


frame is complete
the cold and hot sides of the extruder are now done and fitted
the heated bed is now fitted (still needs wiring up)


I also built/soldered the two identical Stepper Driver boards too, tested and both seem to be fine :)
just need to complete the main board which should be easier!

then just the final wiring and should be ready to go. :D

Friday 4 May 2012

Qnap Ts-412 NAS Lost shares - fixed!!

so my NAS lost all its shares over night somehow... the data was still there according to the hdd sizes reported back.. i just couldn't access them.

QNAP emailed me a fix that required a factory reset and a few other parts that just seemed scary despite the promise I wouldn't loose data!

Here however is my fix which worked flawlessly you can skip steps 1-6 if you don't have capacity/time

(this part can be skipped)
1, Insert a spare drive large enough to take the capacity of the data that is missing.
2, create a new share on that drive (eg "mybackupshare")
3, Enable SSH and then SSH into the QNAP device
4, cd into share/
5, ls * to locate your old shares (can get the names from this list too) and will locate your new backup "mybackupshare" folder too
6, cp -r MD0_DATA/mylostshares/* HDD_DATA/mybackupshare/

this provides a backup of the data in case the next step goes wrong.

(this will rebuild the shares and retrieve data back into those folders)
7, goto the admin panel and click "restore default network shares"
8, create your old shares using the EXACT same name (as found via step 5 above)
9, all your data/shares should be back.

No need for the factory reset at all!

win!

Tie Fighter Waffles


I made this the other month - seems appropriate for today!

Thursday 3 May 2012

3D Printer update.

Did a little more to the printer tonight... but need to grab some other parts before i can do any more :(


Tuesday 1 May 2012

Gnuradio with ubuntu (11.10)

So I installed and played about with Gnuradio after seeing a talk at defcon london this month.

Some little trips i found along the way and their fixes!

GRC (gnu radio companion) wont start - copy your grc.conf file to yourlocal directory, you might need to make the .gnuradio folder first.

 cp /etc/gnuradio/conf.d/grc.conf ~/.gnuradio/config.conf

GRC now works but audio sinks dont like your sound card under ubuntu, this is because your running pulse audio not alsa...and so it cant open the device,  so to solve this set the device name in the sink to "pulse" and set the sample rater to 48Khz

if i find more problems ill add to this post.


Tuesday 24 April 2012

Comms with screen

So today I learnt you can connect to a coms port using screen!

eg

screen  /dev/ttyUSB0 115200 8N1

same screen key bindings work :)

no need for minicom crap now!

Tuesday 10 April 2012

perl modules in ubuntu

Thought I better write this down before I forget it, how to install missing perl modules under ubuntu using apt-get

so say you see this:

Requirements
------------
Net::LDAP
Getopt::Std
Net::Nslookup
Net::Dns

how do you install those?

well simple...
apt-get install libnet-ldap-perl
apt-get install libnet-dns-perl

etc

Saturday 31 March 2012

Flash Video over other windows even when firefox is minimised

Fecking annoying bug recently, if i opened a flash video in firefox it would mess up other windows by showing through everything, even if i minimised firefox.

The fix was pretty easy

In a terminal, execute


gstreamer-properties

and in the second tab change the Plugin option in the "Default Output" to "X Window System - Without XV".

Thursday 22 March 2012

Removing Ubuntu One (ubuntuone-syncd)

First track down and kill the process of ubuntuone-syncd

ps -ef|grep ubuntu
kill -9 {pid number}

then remove the folders it uses
rm –rf ~/.local/share/ubuntuone
rm –rf ~/.cache/ubuntuone
rm –rf ~/.config/ubuntuone
rm –rf ~/Ubuntu\ One

then remove the packages
 sudo apt-get purge ubuntuone-client* python-ubuntuone-storage*


you should be sorted!

Saturday 17 March 2012

getting yaptest to run under ubuntu

So here are some (hopefully complete) notes I have made over the last few hours trying to get yaptest running

after downloading yaptest from pentestmonkey.net
untar etc
and get that made and installed

next you need to get postgres up and running
so you need to be root
apt-get install postgresql

dont forget to start it /etc/init.d/postgres start

You also need a bunch of perl modules
apt-get install libdbd-pg-perl
apt-get install libparallel-forkmanager-perl
apt-get install libdigest-md4-perl
apt-get install libxml-simple-perl


change the pg_hba_conf file too for postgres

change the following lines at the bottom of the file
(/etc/postgresql/9.1/main/pg_hba.conf)
# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:

host    all         all         ::1/128               trust

Remember to restart your postgres server ;)

apt-get install pgadmin3
you will need to use this connect to the 127.0.0.1 database, find the yaptest_user under the login roles and give them create db privilages.

you can now run yaptest-wizard.pl to create the database and run yaptest as normal.

ldapsearch is provided by ldap-utils in ubuntu

Sunday 4 March 2012

Does freezing a laptop battery give it a longer life...(answer no)

So battery on this Dell Mini 9 I got the other day has a terrible battery life, about 2 hours, I decided to do an experiement to see if sticking the battery in the freezer ACTUALLY does something useful

li-ion battery
all testing done with no interaction of the laptop

-- day 1 --
Day one was basically starting from 0% battery to full charge and then letting it run down back to 0% and repeating this several times


Charging from 0% to 100% took 2 hours
Discharging from 100% to 0% was also 2 hours


-- day 2 --
08:30 battery placed in freezer in two bags as per guides on the internet

-- day 3 --
12:00 Battery is removed after 27 hours in the freezer and given two hours to get back to room temperature.

Charging from 0% to 100% takes 2 hours
Discharge from 100% to 0% also takes 2 hours

-- Results --
Freezing the battery has done nothing what so ever to the battery!

-- addendum --
Some people have said that I need to cycle the battery at least 4 times to see an effect, this is currently being done and the results will be posted later on. I dont think it will work...

Dell Mini 9 Linux wifi broadcom drivers (solved) (updated!)

OK so most of this weekend I have spent fucking about trying to find a lightweight linux OS that worked with the broadcom wifi built in.... here are the results

Crunchbang - doesn't install from USB (using unetbootin)
Ubuntu 12.04 beta - didn't work out the box
Ubuntu 10.04 - worked but way way too heavy
Ubuntu 11.10 - too heavy hate gnome3 and unity
Arch - argghhhh just NO
Xubuntu - lightweight but didn't work out the box
Linux mint debian xfce - didn't work out the box
Linux mint 12 - Live CD worked fine - useable but installed didn't work and needed a wired connection

So what have I gone for? Linux Mint 12, set up with a wired connection to install the bcm-kernal-sources which i am hoping to move over to xfce.

** update **

So i have finally found a perfect solution on getting the dell mini 9 to play nice!


first add this to your software repository (using synaptic for example)
deb http://ftp.us.debian.org/debian testing main contrib non-free

then do the rest in a root termin (sudo -s)


apt-get update
apt-get install module-assistant wireless-tools
m-a a-i broadcom-sta
echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
update-initramfs -u -k $(uname -r)
modprobe -r b44 b43 b43legacy ssb brcm80211
modprobe wl


should be done :D

Tuesday 14 February 2012

Network Thumbnails in Ubuntu

Just found this out as a cure for a little annoyance of mine, not seeing thumbnails of images/files over network shares.

goto Nautilus > edit > preferences > preview
and change thumbnails to Always rather than Local Only.

Another small problem in life fixed!

Friday 27 January 2012

3d Rep-rap printer build (phase 2)

Thought I would share the current state of the 3d Rep-rap printer I am building... z-motors installed along with Z-guides, the Y axis wood bed (the Z motor wires are sitting on it) is also installed now and everything is now tightened up and secure - the weight has pretty much trebled too!

Saturday 21 January 2012

ATM card skimmer (real)

Well as I am being all photographic today, I thought I should get some photos up of the ATM I aquired from some friends who found it on an ATM machine in Oxford Street London (they contacted the police but they didnt seem to care - nice!) So after some months I have it and here it is in its full glory.







Now to try to figure out how it works and get into some proper hardware reverse engineering!

Shop anti theft tag (non dye version) taken apart.

Did this a while ago and never got round to blogging it.


This is the type im on about. (it was very damaged from removal by monkeys)

Here we see the damaged tag taken apart, you can (hopefully) see the RFID security part in the long area, and the pin (on the right top) and the black part on the left top is the pin retainer.

 Here you can see the RFID disassembled on the left, and the pin+ retainer on the right top, using a magnet you pop the pin retainer off and the pin comes free.
I leave it to the reader as an excersise on where to place a rare-earth magnet to dislocate the pin retainer.