Difference between revisions of "USB armory"

From YobiWiki
Jump to navigation Jump to search
(Created page with "my personal notes about USB armory =Hardware= * [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX535&fpsp=1&tab=Documentation_Tab Freescale i.MX53] ARM® Co...")
 
 
(11 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
* [https://www.crowdsupply.com/inverse-path/usb-armory crowd funding]
 
* [https://www.crowdsupply.com/inverse-path/usb-armory crowd funding]
 
* [https://github.com/inversepath/usbarmory/wiki wiki]
 
* [https://github.com/inversepath/usbarmory/wiki wiki]
  +
** [https://github.com/inversepath/usbarmory/wiki/Host-communication Host communication]
  +
** [https://github.com/inversepath/usbarmory/wiki/GPIOs GPIOs]
  +
** [https://github.com/inversepath/usbarmory/wiki/Applications Applications]
 
* [https://github.com/ckuethe/usbarmory/wiki alt wiki]
 
* [https://github.com/ckuethe/usbarmory/wiki alt wiki]
 
* [https://groups.google.com/forum/#!forum/usbarmory forum]
 
* [https://groups.google.com/forum/#!forum/usbarmory forum]
 
* [https://github.com/inversepath/usbarmory HW/SW source]
 
* [https://github.com/inversepath/usbarmory HW/SW source]
 
* [https://github.com/inversepath/u-boot-usbarmory U-Boot]
 
* [https://github.com/inversepath/u-boot-usbarmory U-Boot]
* [https://github.com/inversepath/usbarmory/wiki/GPIOs GPIOs]
+
* [http://dev.inversepath.com/download/usbarmory/ Initial SDcard image notes]
  +
  +
=Quick setup=
  +
Set manual ip to usb0: 10.0.0.2, no routing, no DNS, via NotworkManager or:
  +
/sbin/ip link set usb0 up
  +
/sbin/ip addr add 10.0.0.2/24 dev usb0
  +
Beware if you use NetworkManager, don't link a profile to the MAC address of USBarmory because it changes every time!
  +
  +
Give connectivity to USB armory
  +
/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.1/32 -o wlan0 -j MASQUERADE
  +
echo 1 > /proc/sys/net/ipv4/ip_forward
  +
  +
Connect
  +
ssh usbarmory@10.0.0.1 # pwd usbarmory
  +
Or via [https://code.google.com/p/shellinabox/ ShellInABox]: https://10.0.0.1:4200/
  +
  +
Time: at boot, ntpdate will try to fetch time, which can only work if network is automatically properly configured on the host, otherwise for a quick setup time you can do:
  +
ssh usbarmory sudo date --set $(date +@%s)
  +
  +
Free the LED
  +
ssh usbarmory@10.0.0.1 sudo sed -i '/^ledtrig_heartbeat/d' /etc/modules
  +
On the device on can turn the LED on with
  +
echo 0 > /sys/class/leds/LED/brightness
  +
and off with
  +
echo 1 > /sys/class/leds/LED/brightness
  +
A bit strange, I would expect 0 for off till max_brightness=255
  +
  +
Quick backup of the most important things (~9Mb)
  +
ssh -n usbarmory@10.0.0.1 'sudo tar -cpf - /etc /root /home /var' |gzip > backup-$(date "+%Y%m%d-%H%M%S").tgz
  +
  +
Explore image
  +
mkdir mnt
  +
sudo mount -o loop,offset=0x500000,ro usbarmory-debian_wheezy-base_image-20150302.raw mnt

Latest revision as of 01:33, 6 March 2015

my personal notes about USB armory

Hardware

Links

Quick setup

Set manual ip to usb0: 10.0.0.2, no routing, no DNS, via NotworkManager or:

/sbin/ip link set usb0 up
/sbin/ip addr add 10.0.0.2/24 dev usb0

Beware if you use NetworkManager, don't link a profile to the MAC address of USBarmory because it changes every time!

Give connectivity to USB armory

/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.1/32 -o wlan0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

Connect

ssh usbarmory@10.0.0.1 # pwd usbarmory

Or via ShellInABox: https://10.0.0.1:4200/

Time: at boot, ntpdate will try to fetch time, which can only work if network is automatically properly configured on the host, otherwise for a quick setup time you can do:

ssh usbarmory sudo date --set $(date +@%s)

Free the LED

ssh usbarmory@10.0.0.1 sudo sed -i '/^ledtrig_heartbeat/d' /etc/modules

On the device on can turn the LED on with

echo 0 > /sys/class/leds/LED/brightness 

and off with

echo 1 > /sys/class/leds/LED/brightness 

A bit strange, I would expect 0 for off till max_brightness=255

Quick backup of the most important things (~9Mb)

ssh -n usbarmory@10.0.0.1 'sudo tar -cpf - /etc /root /home /var' |gzip > backup-$(date "+%Y%m%d-%H%M%S").tgz

Explore image

mkdir mnt
sudo mount -o loop,offset=0x500000,ro usbarmory-debian_wheezy-base_image-20150302.raw mnt