000webhost

Web hosting

Wednesday, September 19, 2012

Automated Research and Some More Wireless Foo

One of the things that I sometimes wonder is whether or not Australia is lucky or unlucky in being so geographically isolated. Some industries (Airline and Motoring are probably the most recent and notable examples that come to mind) have not been provided with a level playing field when compared with the rest of the world. They've either been playing with one hand tied behind their back or others have. They haven't learnt to adapt. I think this is what happened with another industry that I recently had interactions with. Overseas, firms in this particular sector have advanced significantly over local competitors most particuarly in the clever use of technology. I've been thinking about this issue more though. Some of the concepts mentioned in my previous report (Convergence Effect)(such as 'Automated Research', http://dtbnguyen.blogspot.com/2012/03/automated-research.html) have had significant resources allocated to them but it's becoming clearer to me just how far we can push it. Data mining, searching, statistical analysis, and report writing are all processes that can be significantly automated with sufficient knowledge and application of technology (I'll provide a more detailed framework on how to achieve this in the context of Security analysis in my report on, 'Cloud and Internet Security' (about 557+ pages/155K+ words now) but obviously it can be used in other contexts as well).

http://www.businessweek.com/articles/2012-09-13/watch-out-google-facebook-s-social-search-is-coming#r=shared

In my recent experiments I've obviously been experimenting with various different USB wireless adapters. One of them was the D-Link DWA-125 A3 (rt5370sta), another was the NetGear WNDA4100 (rt3573sta, you need to modify the driver to add support for the new chipset, http://ubuntuforums.org/showthread.php?t=1942689), while another was Jaycar's YN8306 (all Ralink chipets funnily enough with decent Linux support, http://www.ralinktech.com/en/04_support/support.php?sn=501). Clearly, after doing a lot of experimental work I've discovered a lot about antenna technology as well as the current state of wireless technology out there. One of the things I didn't realise is how drastic some of the differences could be between revisions of both adapter and chipset. My original purchase of the YN8306 seemed to be reasonable but the performance was nothing spectacular (Ralink 3070L). After discovering the USB port was somewhat loose (it was constantly losing grip of the cable) I exchanged it for another one but discovered something similar so this time I opened up the device and made some modifications (extra solder to bolster the strength of the USB port). While I was in there I noticed that the chipset had been upgraded to the Ralink 3072L. My thoughts regarding the Rev A were that it was good but didn't have the level of sensitivity that I thought it would. Rev B was a bit different though. Based on initial observations it may be at least 20% stronger with regards to sensitivity when compared to the Rev A and transfer rates were far less likely to fluctuate. A significantly better device overall.

With my recent incursions into antenna design I should probably extrapolate on what exactly I mean. I've torn apart anything and everything that I could possibly get my hands on and have even resorted to modifying television equipment in combination with broad range amplifiers to boost signal strength (I know it's not 'tuned' to the correct frequency but I just wanted to see what would happen.). What have I learnt? With enough imagination a lot of weird and wonderful things are possible. While hooking up my wireless adapter to the home television antenna (yes, the one on the roof) prooved to be an interesting exercise it only yielded slightly better results than having no antenna at all. A broad spectrum amplification device brought it up to slightly better than the originally included 5dBi antenna and forays into using antenna systems extracted from a dead router only yielded neglible benefits. A 16dBi antenna purchased during a local swap meet did result in a noticeable (though still small) gain though. Using a sieve (it's actually quite difficult to find suitable parabolic/spherical sized shapes in the house (unless you're willing to tear up potentially valuable goods such as headlamps). I had to go out and purchase a sieve for $2.80 at a local 'value store') only helped in certain configurations (I later found out an antenna from an old eMac was actually able to significantly boost the sensitivity of the DWA-125 A3 depending on it's polarity.) unless I switched to a more forgiving Gregorian Satellite Dish design (I used another smaller sieve and some elastic bands to replicate the design).

http://en.wikipedia.org/wiki/Satellite_dish

I even tried extremely crude Cantenna and Yagi style antenna designs (I'm waiting for an order to come in). The difference was that I made mine out of solf drink bottles with the bottom cut out wrapped with aluminium foil and also something I call 'Ruler-Yagi'. Basically, an antenna that was made out of a wooden ruler (boom), gold paperclips (it's suprising what you can find these days at Officeworks), blu-tack, and connected to a wireless adapter using alligator clips. There was a significant boost in signal (50%) when my 'Softenna' was directed properly and surprisingly there was an actual gain for 'Ruler-Yagi' but once again it was only minimal (10-20% signal sensitivity increase).

In the context of cyber-intelligence/operations it interests me to see what sort of antenna systems we could possibly pursue. There is a high likelihood that given the right materials high gain antennas could be embedded or inserted inside of suit cases or even other devices with connectivity being provided via cable (or hopefully) wireless. For example, a supposedly long life battery could be modified to provide a genuinely higher gain antenna provided space/cells were cleared from the internal cavity. Alignment could be facilitated by an internal lens/reflective camera system.

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Sunday, September 16, 2012

Windows (and Android) Aren't (That) Inflexible...

If you've played around with Windows ISO's then you'd realise that with the advent of Windows Vista and 7 it is possible to convert a generic ISO to a so called 'Universal' addition through some ISO file modifications (and of course the correct 'Prodcut Key').

http://code.kliu.org/misc/winisoutils/
http://tweaks.com/windows/40135/install-any-edition-of-windows-7-from-any-windows-7-dvd/
http://www.mydigitallife.info/how-to-select-any-edition-or-version-sku-of-windows-7-to-install-from-single-edition-dvd-disc-media-or-iso/
http://www.mydigitallife.info/create-windows-7-universal-iso-with-all-editions-selection-on-install-with-ei-cfg-removal-utility/

If you've been playing with Windows 8 and have not become accustomed to the interface there is some salvation.

http://www.stardock.com/products/start8/
http://www.techrepublic.com/blog/window-on-windows/start8-put-the-start-menu-back-in-windows-8/5864
http://www.askvg.com/download-classic-shell-skin-to-get-windows-7-look-like-start-menu-and-start-button-in-windows-8/

For those of us who need or would like to extend the trial period for Windows 7.

http://forums.mydigitallife.info/threads/19113-IR5-The-Official-Windows-7-Rearm-Solution
http://forums.mydigitallife.info/threads/17938-GUIDE-How-to-really-run-Windows-7-forever-without-applying-any-cracks
http://forums.mydigitallife.info/threads/24744-Trilogy-4-2
http://msftkitchen.com/tag/removewat

If you haven't realised already the Kobo VOX is basically a low end tablet running Android. Moreover, there is an active community out there that is working on unlocking  the full capabilities of this device.

http://www.mobileread.com/forums/showthread.php?t=156773
http://www.mobileread.com/forums/showthread.php?t=94213

You can mount filesystems other than FAT32 on Android and have multi-partition support though I wouldn't say that it is 'clean' at this stage.

http://www.androidzoom.com/android_applications/tools/drive-mount_bbjqc.html
http://ubuntuforums.org/showthread.php?p=7446857
http://androidforums.com/samsung-galaxy-tab-2/543306-exfat-ext3-support.html
http://code.google.com/p/android/issues/detail?id=8111
http://forums.whirlpool.net.au/archive/1790655

If you haven't heard already it is possible to run Debian alongside Android on your smartphone making the possibilities almost limitless.

http://evilzone.org/android/debian-on-android/
https://github.com/guardianproject/lildebi
http://android-dls.com/wiki/index.php?title=Installing_Debian
http://evilzone.org/android/debian-on-android/
http://www.androidfanatic.com/community-forums.html?func=view&catid=9&id=251
http://www.saurik.com/id/10/
http://g1tools.googlecode.com/

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Monday, September 10, 2012

Mobile (Wireless and Power) Foo

Recently, I have had to go slightly more mobile and in doing so I've been examining both portable wireless as well as power solutons. There has been some previous work with regards to powering a netbook using a series of AA batteries in series but I've been experimenting with basically using anything I have available to me. Seeing as though I'm limiting myself to what I have though it's been interesting. Some of the battery holders that are available aren't designed to work unless they are completely populated meaning some re-wiring work is required (alligator clips) if you don't have a perfect set of batteries to fulfil your requirement (yes, I'm aware of the recommendation that you should use a balanced set of batteries but I only require the supply for a maximum of 1 minute while I switch over the actual laptop battery. Another alternative is of course using a voltage regulator/inverter.

You may be asking why I'm not just using a power inverter or a car/air laptop adapter of some sort? Well, based on what's available at my local retailers the choice isn't optimal and doesn't come in at a reasonable price. Dirty power and modified sine waves just aren't my idea of an 'ideal solution'. Hence, my foray into more flexible forms of energy. A more refined product is of course available such as the following.

http://www.batteries-depot.com/outproducts.php/24+3973

We're almost at the point where the price of solar panels, regulation, and storage have dropped (and cell efficiency has increased) such that it may be a worthwhile investment in a home (and mobile) environment. I've seen complete $200-300 options (panels, regulators, and storage pack) available at local electronics/automotive retailers of late.

Wireless technology has come a long way but it's still clear that more research is required. In some of my other work (my "Cloud and Internet Security" report is likely to exceed 600 pages now...) I've been scrutinising wireless security (and therefore long (at least 300 metres away between the source and the target with less than optimal conditions such as trees, fences, and other objects in between using both standard and inexpensive (less than $50) long range equipment. Look up Alfa wireless though there don't seem to be too many local options.) range and broad spectrum wireless options). There is still a substantial amount of Draft-N equipment (I've noticed some retailers have been clearing wireless equipment of late probably in anticipation of 802.11ac equipment. I've also noticed a trend towards merely modifying reference chips rather than seeking the most optimal performance and often manufacturers will swap chipset entirely between revisions if there are significant problems with the original release.) out there at the moment even though 802.11n was officially ratified several years ago and 802.11ac (pre-draft versions) equipment is actually on the market right now.

http://en.wikipedia.org/wiki/IEEE_802.11
http://en.wikipedia.org/wiki/IEEE_802.11n-2009
Based on random testing in my area it's clear that 2.4GHz wireless equipment is far more popular than 5GHz and dual band solutions are prohibitively expensive when compared with single band solutions. While MIMO has been around for a while multi-stream technology is still something we're figuring out. Three (two stream products seem to be mostly fine) stream products have only hit the market recently and research indicates that this may be due to the sheer complexity of such a setup and lack of sufficient CPU power (for a reasonable price) in a small package.

People seem to complain a lot about customer service/support these days. Based on an examination of local retailers there's very little to separate customer experiences. I have the funny feeling that if manufacturers/retailers just followed the letter of the law and provided reasonable products they would be considered the odd ones out? If you do some research you'll find that some practices border on illegality and depending on the firms in question there is a general lack of quality control and monitoring when outsourcing work.

http://www.customerservicescoreboard.com
Prior to some of my recent antenna experimentation I thought antenna design was reasonably simple. How naive... While there are many general designs out there a lot of them undergo extensive 'tuning' and it's not immediatelly clear why they are so different from 'average antenna' designs. For example, I recently opened up a USB wireless adapter, a DWA-125 A3 (removing RF shield on a DWA-125 A3 reduced signal strength by perhaps 5% but its perceived difference in performance was negligible to be honest). It was a strange design (from my perspective) because when you ran a continuity test through it's not immediately clear that there was a distinction between ground and signal. Compare it with an examination of a Sierra 306 USB 3G (Telstra Elite 21) modem where there is a clear and distinct one to one correlation between external antenna connector and on board antenna systems (I've read that that one is for transmission and another is for reception with sometimes another option for an auxillary antenna in embedded routers solutions). 

http://www.wirelessforums.org/wireless-networking-discussion/diy-wifi-active-antenna-build-54992.html
http://www.instructables.com/id/How-to-make-an-active-wifi-tetrapak-antenna-fast/

Once you understand the concept of metamaterial antennas though it becomes clearer how they work. By altering materials you can (theoretically) increase the isolation between ground and signal providing for overall stronger signal quality and basically increase the virtual size of the antenna. Something which is not immediately obvious if you are new to miniature antenna design (I've seen some other work whch also questions this design but bypasses/improves on it by allowing for connection of higher gain conventional antenna solutions).

http://en.wikipedia.org/wiki/Metamaterial_antenna
http://en.wikipedia.org/wiki/Smart_antenna

You need to understand the theory behind the antenna in order to be able to find optimal reception whether or you will never be able to extract the optimum solution without extensive trial and error. Recently, I was fiddling around with various antenna solutions (anything that was immediately available to me from pots, pans, cans, TV antennas, to COTS solutions. Most designs/solutions are too specialised though and have too narrow a performance band. The most general wide band solution that I came across was based on parabolas and cutlery holders in a directional/perpendicular arrangemnt/setup with back panel of an dissassembled eBook Reader which had a passive cooling solution on it in the form of aluminium sheeting.) seives and other parabola like shapes with non-standard shaped USB wireless adapters. Convential orientation with the antenna (and dish like object) pointing direct at the target was significantly better (from 55 to 75% signal quality) but non-optimal than when the horizontal reference plane of the receiver was below the target and therefore the azimuth between the target and the adapter was increased (75 to 100% signal quality). Admittedly, this had partly to do with the physical objects between the adapter and the target and the interaction (absorption, reflection, superposition, and so on) between them (high school and early graduate level physics is useful here). However, if you understood how the waveform radiates from the source than you would have understood why this was a more optimal setup.

In the context of pentration testing and network design this knowledge would also be useful in dealing with 'blind spots' and more covert access points. While there is software that can predict/simulate (within reason) wireless signal interaction with architecture and signal gain of different antenna designs in the real world this can be cumbersome. Its easier more useful if you know most of theory off the top of your head, guesttimate in the field, and then use software to confirm/more accurately determine your guesttimations.

Some serious beasts when it comes to routers out there at the moment. Power consumption similar to netbook (but with performance to match).

Typical connectors for reference.

Huawei 3G - CRC9
Internal Laptop - U.FL/I.PEX
NetGear/D-Link - RP-SMA
Linksys - RP-TNC

Saturday, August 18, 2012

Funky Firmware

I've been examining my home network. Part of this process has obviously involved examining firmware upgrade options for embedded routers such as OpenWRT, DD-WRT, and Tomato. I have a Linksys WRT-54GL lying around but due to the flash constraints (it runs with 4MB flash and 8MB RAM) I've also been investigating other options (including hardware mods) and alternative hardware for a reasonable (sub-100). The hardware mods (such as USB, SD, Serial, etc...) aren't all that difficult. The main thing to take into consideration though is that this is the Internet. Information will vary in quality, people have slightly different hardware, and of course the way people communicate isn't always clear. Nonetheless, an SD card mod is very much a viable (and easy if you are a semi-decent solderer) option if you need more space for software installation (though indications of a short aren't exactly easy to decipher in the logs though).

Log entry with bad soldering job for SD mod.

[INFO] mmc_hardware_init: initializing GPIOs
[INFO] mmc_card_init: the period of a 380KHz frequency lasts 524 CPU cycles
[INFO] mmc_card_init: powering card on. sending 80 CLK
[INFO] mmc_card_init: 80 CLK sent in 43663 CPU cycles
[INFO] mmc_card_init: resetting card (CMD0)
[FATAL] mmc_card_init: invalid response from card: ff found, waiting for 01
[INFO] mmc_card_init: the period of a 380KHz frequency lasts 524 CPU cycles
[INFO] mmc_card_init: powering card on. sending 80 CLK
[INFO] mmc_card_init: 80 CLK sent in 43275 CPU cycles
[INFO] mmc_card_init: resetting card (CMD0)
[FATAL] mmc_card_init: invalid response from card: ff found, waiting for 01
[ERROR] mmc_init: got an error calling mmc_card_init: 01
[ERROR] mmc_check_media: change detected but was not able to initialize new card: ffffffff

Log entry with good soldering job for SD mod.

[INFO] mmc_hardware_init: initializing GPIOs
[INFO] mmc_card_init: the period of a 380KHz frequency lasts 524 CPU cycles
[INFO] mmc_card_init: powering card on. sending 80 CLK
[INFO] mmc_card_init: 80 CLK sent in 43646 CPU cycles
[INFO] mmc_card_init: resetting card (CMD0)
[INFO] mmc_card_init: doing initialization loop
[INFO] mmc_card_init: card inited successfully in 354 tries (10920782 CPU cycles).
[INFO] mmc_init: MMC/SD Card ID:
01 50 41 53 30 31 36 42 45 8a 16 3f b4 00 59 1f [INFO] Manufacturer ID   : 01
[INFO] OEM/Application ID: PA
[INFO] Product name      : S016B
[INFO] Product revision  : 4.5
[INFO] Product SN        : 3a529fb1
[INFO] Product Date      : 2005-9
[INFO] mmc_card_config: size = 14560, hardsectsize = 512, sectors = 29120
[WARN] mmc_init: hd_sizes=14560, hd[0].nr_sects=29120
[INFO] mmc_card_init: set_blocklen (CMD16) succeeded !
Partition check:
 mmca: p1

http://beta.ivc.no/wiki/index.php/Adding_SD_card_to_WRT54GL
http://www.isnull.com.ar/2009/12/wrt54gl-v11-sd-card-mod-with-openwrt.html
http://wiki.openwrt.org/doc/howto/mmc_over_gpio
http://www.jbprojects.net/articles/wrt54gl_mods/#sw2
http://www.dd-wrt.com/wiki/index.php/Linksys_WRT54G-TM_SD/MMC_mod
http://programmingstuff.free.fr/files/openwrt/whiterussian/mmc/src/

Along the way, I obviously found some interesting information about the hardware as well. One thing which surprised me though was how little exploration (it seemed that way to me) was done of the onboard voltages though. Some of the extraneous circuits out just didn't seem to be required. On my board alone there seemed to be stable sources for 2 (LEDs), ~3 (JTAG/Serial), 1.8, 5, 15 (DC Jack) volts around various areas of the board (with some clever programming and/or wiring you may also be able to extract decent/stable voltages from the Ethernet ports as well).

Please note that there is a difference in signalling/voltage between the onboard JTAG and standard RS-232 serial ports though. Note also, that while the difficulty of the solder job to create onboard serial/JTAG ports is trivial the USB job is can be extremely difficult if not well thought out or if you don't have adequate equipment on hand.

http://www.dslreports.com/forum/r22654574-Undersized-Power-supplies-from-Linksys.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54242&postdays=0&postorder=asc&start=75
http://www.techrepublic.com/photos/cracking-open-the-linksys-wrt54g-wireless-router/62182
http://woodhousellc.com/?p=30
http://en.wikipedia.org/wiki/Ethernet_over_twisted_pair
http://www.mingtek.tw/pdf/B-17.pdf
http://www.powco.net/wrt/
http://www.jbprojects.net/articles/wrt54gl_mods/
https://forum.openwrt.org/viewtopic.php?id=9653
http://www.devttys0.com/2011/07/reverse-engineering-vxworks-firmware-wrt54gv8/
http://wikidevi.com/wiki/Atheros
http://www.wrtrouters.com/router/wrt54g/
http://en.wikipedia.org/wiki/Linksys_WRT54G_series
http://infodepot.wikia.com/wiki/Linksys_WRT54GL_v1.0
http://infodepot.wikia.com/wiki/Linksys_WRT54GL_v1.1
http://www.apcmedia.com/salestools/VAVR-5WKLPK_R1_EN.pdf
http://en.wikipedia.org/wiki/Serial_port
http://www.aggsoft.com/rs232-pinout-cable/pinout-and-signal.htm
http://forums.whirlpool.net.au/archive/1784403
http://www.instantfundas.com/2010/07/7-alternative-firmware-for-wireless.html
http://www.jbprojects.net/articles/wrt54gl_mods/
https://forum.openwrt.org/viewtopic.php?pid=5329
http://wiki.openwrt.org/doc/howto/mmc_over_gpio
https://forum.openwrt.org/viewtopic.php?id=9653&p=1
https://forum.openwrt.org/viewtopic.php?pid=47366
https://forum.openwrt.org/viewtopic.php?id=23308
http://en.wikipedia.org/wiki/Capacitor_plague
http://www.apogeekits.com/power_adapter_selection.htm
http://answers.yahoo.com/question/index?qid=20080823014024AADQZnk
http://en.wikipedia.org/wiki/Failure_modes_of_electronics
http://www.elexp.com/t_solder.htm
http://helpdeskgeek.com/windows-7/windows-7-hyperterminal/
http://www.evga.com/forums/tm.aspx?m=185066&mpage=1
http://electronics.stackexchange.com/questions/1409/best-methods-to-fix-broken-tracks
http://en.wikipedia.org/wiki/Voltage_spike
http://parashell.sourceforge.net/docs/parallel.txt
http://www.unixmen.com/unp-universel-file-extractor/

Note that if you end up using the Ritmo HL-340 USB to serial adapter you'll need the ch341 kernel module under Linux and the following driver for Windows 64 Bit (not included on the support CD that I received).


Bus 002 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

[130081.190436] usb 3-1: new full speed USB device number 2 using uhci_hcd
[130081.349157] usb 3-1: New USB device found, idVendor=1a86, idProduct=7523
[130081.349171] usb 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[130081.349182] usb 3-1: Product: USB2.0-Ser!
[130081.467336] usbcore: registered new interface driver usbserial
[130081.467386] USB Serial support registered for generic
[130081.467474] usbcore: registered new interface driver usbserial_generic
[130081.467482] usbserial: USB Serial Driver core
[130081.480724] USB Serial support registered for ch341-uart
[130081.480788] ch341 3-1:1.0: ch341-uart converter detected
[130081.492731] usb 3-1: ch341-uart converter now attached to ttyUSB0
[130081.492825] usbcore: registered new interface driver ch341

I explored a number of options for a full router upgrade (but D-Link/Netcomm/NetGear were prime options simply because I had credit at my local Officeworks store). Here are some of the options. Note, that most on-line reviews of D-Link hardware seem to indicate that these are terrible devices in their normal guise/firmware configuration (they also seem to have a history of releasing bad first versions but solid subsequent revisions (read Amazon reviews)) but with better firmware they can make extremely good, inexpensive pieces of hardware.

https://www.flashrouters.com/blog/2012/02/07/d-link-dir-632-dd-wrt-router-with-8-ethernet-ports-integrated-vpn-usb-port-featured-dd-wrt-flashrouter-of-the-day/
http://forum.pfsense.org/index.php?topic=47207.0
http://doc.pfsense.org/index.php/HOWTO_Install_pfSense
http://www.dd-wrt.com/wiki/index.php/Known_incompatible_devices
http://www.dd-wrt.com/wiki/index.php/Supported_Devices
http://www.dd-wrt.com/wiki/index.php/JFFS_File_System
http://www.dd-wrt.com/wiki/index.php/D-Link_DIR-632
http://www.dd-wrt.com/wiki/index.php/D-Link_DIR-825

Moreover, depending on your router choice you may be able to gain 3G backup capability (via USB modem).

http://www.dd-wrt.com/wiki/index.php/Cellular_Phone/USB_Modem_as_WAN_connection
http://doc.pfsense.org/index.php/Configuring_3G_modems

Another choice of course is to simply turn a spare PC/laptop/netbook into a router and use a crossover cable to keep things going (laptop is obviously a decent choice since it basically has its own backup power system).

https://support.net.com/display/UXDOC1/Ethernet+Crossover+Cable
http://en.wikipedia.org/wiki/Ethernet_crossover_cable
http://www.jaycar.com.au/productView.asp?ID=YT6081
http://ubuntuguide.net/ubuntu-connect-to-internet-via-android-phone-as-usb-modem

3G setup is actually fairly easy (depending on the modem) under Linux (I've seen and heard of bad things when it comes to many OEM software driver setups).
usb_modeswitch -v [Vendor ID] -p [Product ID] -R
nm-connection-editor (or some other network configuration utility).

Watch for some wierdness though. I had one system not being able to automatically pickup DNS setting from the ISP. I had to manually insert a rule.

https://bugzilla.redhat.com/show_bug.cgi?id=467004
http://forums.whirlpool.net.au/archive/1544486

While we're on the topic of firmware there does seem to be Open Source firmware projects for well known SSD's out there.

http://www.openssd-project.org/wiki/The_OpenSSD_Project

As you can see though, SSD reliability is still very much up in the air (across ALL manufacturers) though (keep backups, do your research, and so on.).

http://www.xtremesystems.org/forums/showthread.php?271063-SSD-Write-Endurance-25nm-Vs-34nm

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Cleanup Operations

If you haven't already figured out already I often repair/investigate devices (for myself as well as on behalf of others) in my spare time. I was recently given an Acer Aspire One 531h, a Acer Aspire 1671 as well as a laptop that was running Vista in a foreign language. Let's start with the easy stuff. Language packs are easily handled via the following. Please note that while this may handle most dialogue within the operating system itself it doesn't deal with installed programs such as utilities, security, and other software.

http://www.froggie.sk/download.html
http://support.microsoft.com/kb/946928
http://www.mydigitallife.info/windows-vista-mui-language-packs-for-x86-and-x64-direct-download-link/
http://windows.microsoft.com/en-us/windows-vista/Change-the-display-language
http://windows.microsoft.com/en-US/windows-vista/Install-a-display-language

The Aspire One and 1671 were much more difficult propositions. It was clear that they had previously been opened and were mis-diagnosed or had strange fixes applied to them. The 1671 was shutting down a few seconds after boot or would only boot when the battery had been charged for a little while. While opening it up:
- plastic pieces fell off after they had previously been broken and were inadequately put back (super/expoxy glue can work but is harder to use when dealing with thin plastics)
- there was glue where it shouldn't have been (super glue debonder helps here)
- the CPU wasn't locked down properly (there's a screw/lever mechanism for locking it in place normaly)
- it was clear that several screws were misplaced
- there were globs of heatsink compound everywhere, and so on...
It's clear that the previous person thought that the problem was entirely down to heat. By running a multimeter over the terminals of the DC jack it was clear that this wasn't the case though. The inner pin of the DC jack was losing contact with the mainboard which meant that only a trickle of charge was reaching the system with the result being unable to start the system or only being able to start it with an adequately charged battery (Unsurprisingly, it also had other issues such as a pirated version of Windows). On top of this, the trackpad seemed to be disabled by defaut after software re-installation?

http://www.daniweb.com/hardware-and-software/pc-hardware/usb-devices-and-other-peripherals/threads/25588/synaptics-touchpad-suddenly-stopped-working

Like the 1671, the One had many problems (the primary issue was the that no charge was reaching the system though):
- there was a break in the cable on the old AC adapter when you bent it. It also seemed to be a poorly made replacement (Lite-On branded but reviews seem to be poor on Amazon with similar problems reported, http://www.daniweb.com/hardware-and-software/pc-hardware/usb-devices-and-other-peripherals/threads/25588/synaptics-touchpad-suddenly-stopped-working) with the plug being slightly too large for the socket. Jigglng the plug made it work but it also exacerbated the problem with the DC jack. You were basically covering one problem with another and dismounting the pin in the DC jack (you can choose to either re-solder or replace)
- cable between mainboard and front LED lights had worn out contacts ('mended' by trimming a bit off the tip)
- there was a break in the connection between the internal wireless card and the attenna (re-soldered)
- the centre point on the DC jack was not connected properly to the mainboard (re-soldered)
- there was a break in the plastic on the right side panel (glue)
- numerous screws were misplaced (guess-timation)
- two charging pins to the battery were mis-aligned (bent back to shape)
- there was a massive break in an internal cable between the power switch and the mainboard (Alternatively, you can turn it on by shorting pins 2/3 of the relevant connector on the mainboard). After seeing the cost of the cable online and comparing it with the cost of device itself I half thought about (drilling holes or just swapping the switch for another existing port such as USB, Ethernet, etc... I've done it with phones before though but have 'sculpted' the switch rather than the case most of the time) using a small microswitch but obviously the solution wouldn't be elegant, light on power button wouldn't be perfect, etc...

http://www.laptoprepair101.com/laptop/2007/12/06/dc-power-jack-repair-guide/
http://www.ehow.com/facts_7611392_problems-laptop-dc-jacks.html
http://www.technibble.com/forums/showthread.php?t=37678
http://www.therailwire.net/forum/index.php?topic=26454.0
http://www.cdsparts.com/p-3212-new-acer-aspire-one-531h-ao531h-zg8-power-board-cable-50s6507003.aspx
http://www.cdsparts.com/p-3452-new-acer-aspire-one-531h-netbook-power-board-da0zg8pb6e0.aspx
http://acer--uk.custhelp.com/app/answers/detail/a_id/3009/~/hotkeys-and-key-combinations-on-aspire-one-netbooks

http://support.acer-euro.com/drivers/

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Monday, August 6, 2012

Space Saving

I've been running out of hard drive space. While I've upgraded I've also done a little bit of 'cleaning up' as well. Little did I know just how difficult this would be. With the recent increase in hard drive prices (due primarily to the Thailand floods) I (and others) have been looking at unusual sources. One of these has been purchasing portable hard drive expansion packs (hard drive and enclosures) that are on sale and removing the internal hard drive which often ends up being cheaper than purchasing the drive alone. Sounds simple, right? Not quite.

I tend to do some background on product purchases. In the past, this has held me in relatively good stead but with the advent of online marketing and reviews it seems as though everything has balanced out. Almost every single brand seems to have 'problems' and unless something is truly worthy it is unlikely to have a clean bill of health. In fact, a random sample of Amazon (and HDSentinel) reviews seemed to indicate that anywhere between 10-25% on average are dissatisfied with their purchase of electronic goods (anything from flash memory, hard drive, routers, to wireless network cards).

http://www.behardware.com/articles/862-7/components-returns-rates-6.html
http://www.hdsentinel.com/knowledgebase.php

On top of this an increasing number of companies are locking down their hardware/software which means that modification can be difficult if not impossible. Obviously, there are issues relating to consistency, security, and so on. While some compromises I understand, other's I'm not so certain about. For instance, Clickfree actually have a microchip in their enclosures (warranty void if removed) which holds the key to being able to use the internal drive as a normal drive or as a 'Clickfree' drive. Toshiba have been attempting to draw more power than standard from USB ports for their external enclosures than standard. Seagate have been (depends on the age of the enclosure) using slightly larger than normal (12.5mm as opposed to 9.5mm height drives) in their enclosures which means you can't use them as a replacement for your internal hard drive. Western Digital have even altered their circuit boards so that instead of a generic SATA out interface that leads to a USB controller/interface card which then leads to your PC the circuit board is direct to USB (I never would have believed this had I now seen the pictures on HDDGuru). I've even seen accounts of HP using non-generic PCB's which basically encrypt the contents of your drive which mean that while your data is safe if it is removed from the drive in the advent of a failure it's difficult/impossble to recover your data without skilled aide. Firmware flashing of the requisite chip seems to be the only way around this without using a different enclosure.

http://www.phonenews.com/toshiba-acknowledges-macbook-woes-canvio-usb-3-0-hard-drives-18699/
http://forum.hddguru.com/disk-with-sata-usb-adapter-remove-virtual-rom-t18492.html
http://windowssecrets.com/forums/showthread.php/125707-How-to-delete-a-CDFS-partition-on-a-hard-drive
http://forum.hddguru.com/disk-with-sata-usb-adapter-remove-virtual-rom-t18492-60.html
http://www.ted.com/
http://www.station-drivers.com/page/jmicron.htm
http://hddguru.com/software/2005.10.02-MHDD/
http://forum.hddguru.com/wd5000bmvv-connector-t16203.html

Moreover, many firms are developing tamper proof enclosures that mean that opening them up is extremely difficult without causing damage to the enclosure themselves. The general consensus seems to be a combination of higher local ambient temperature and careful prying using thing pieces of plastic/metal is the best way.

http://forums.seagate.com/t5/Other-External-products/Would-the-hard-drive-inside-a-640GB-Expansion-Portable-fit/m-p/50297
http://hardwarespot.net/computer-hardware/how-to-open-a-toshiba-portable-hard-drive-without-case-damage

While I've previously used SyncToy and other tools to run backups and syncronise drive contents I recently came across Syncback. Overall, it's just like many other backup tools. The thing I like about it is that it creates it's own backup logs (HTML format) instead of me having to create them.

http://www.2brightsparks.com/syncback/index.html

Transcoding of media files seems like an extremely simple affair and I thought that many applications would be able to handle audio syncronisation issues easily by now but that's not the case. Whether I'm using CLI (ffmpeg) or GUI (HandBrake, FormatFactory, MediaCoder, Avidemux, etc...) based tools there doesn't seem a single tool that can transcode (at an acceptable level of quality) without extra input from the end user while maintaining sync without causing abberations in the transcoded file. The simplest option seems to be a mass transcode via MediaCoder/ffmpeg and then using the MediaInfo/Avidemux/VLC in order to re-sync/edit the transcoded file back to normal. This of course, raises other concerns.

ffmpeg -i out.ogg -itsoffset 4.267 -i out.ogg -map 1:0 -map 0:1 -ar 22050 video.flv

http://www.avsforum.com/t/1098651/converting-video-files-keeping-audio-in-sync
http://www.kkoncepts.net/node/69
http://howto-pages.org/ffmpeg/
http://support.microsoft.com/kb/316992
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html

In my case, temperatures were exceeding acceptable limits/normal parameters which meants that it would automatically trigger system shutdown. Obviously, I've worked with CPU throttling applications (I even built one) previously though so using a combination of ThrottleStop, Open Hardware Monitor, and Process Lasso I've been able to slow things and maintain a more sustainable thermal environment.
http://www.techinferno.com/downloads/
http://forum.mediacoderhq.com/viewtopic.php?t=3381
http://forum.mediacoderhq.com/viewtopic.php?f=17&t=6383
http://forums.whirlpool.net.au/archive/1141751
http://www.avidemux.org/smf/index.php?topic=10793.0
http://forum.notebookreview.com/gaming-software-graphics-cards/674100-throttlestop-expiry.html
http://www.cpuid.com/
http://www.techinferno.com/downloads/?did=41
http://openhardwaremonitor.org/
http://www.techpowerup.com/realtemp/

If you've ever used a particular brand from Jaycar you'll notice that they have some quality control issues. Recently, I once purchased a mini microSD card reader but after noticing read errors from the device I returned it for another. I noticed the same thing again but this time decided to take a closer look. Apparently, they may have a dry solder problem with what appears to be an onboard crystal oscillator.

http://en.wikipedia.org/wiki/Crystal_oscillator

I also noticed similar read issues with another product (a USB to IDE/SATA convertor) from this particular brand. As soon as it hit the 1GB file mark of a certain file copy (this only seemed to occur on one particular file transfer) it seemed to silently fail (under Windows). There are accounts of the core chip not dealing with errors correctly (under reporting information during failure) and also incorrect/un-optimal implementations. I may explore this further if I have time but I'm still working on my 'Cloud and Internet Security' report.

http://www.jmicron.com/JM20337.html
http://bigacid.wordpress.com/2008/12/08/jm20337-read-data-corruption-solution/
http://forums.seagate.com/t5/Barracuda-XT-Barracuda-Barracuda/Silent-write-failures-with-500G-SATA-in-JM20337-USB-enclosure/td-p/60970
http://answers.softpicks.net/answers/topic/reading-errors-on-JMicron-JM20337-USB-SATA-1894164-1.htm
http://www.gossamer-threads.com/lists/linux/kernel/953952
http://blog.gmane.org/gmane.linux.usb.general/page=61

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Wednesday, August 1, 2012

If Only Reading Were Easier, eBook Firmware Modifications, and More

I recently came into possession of a MiGear eBook Reader. It's not the best eBook device in the world but I got it for a price that was hard to refuse. One of the things I've discovered is that while it makes a great video/photo viewer and music playback device it's actual eBook reading capabilities needed a bit of work (the zoom function doesn't work particularly well in the default firmware which means that a lot of scrolling needs to be done because the fonts are too large or the words are too small because the there neds to be greater magnification).

Like others I've been exploring the full capabilities of the device and looking at modifying/changing the firmware to fully exploit it. The device itself is based on the Rockchip RK2738 which is often used in MP3/MP4 music devices with the rest of the device relying on inexpensive and readily available PC electronics. It is also used in many eBook readers as well which means that as long as the reader is based on the same chip you can chop and change as you like. Moreover, while it is possible for you to end up with an (inexpensive in this case) paperweight there are existing provisions to activate a recovery mode of sorts by shorting pins 29/30 on the flash chip (Based on what I've read and done it seems to be very hard to 'brick'. The product itself seems to be hobbled by the firmware than the hardware.).
http://www.rock-chips.com/index.php?lang=en

http://www.2shared.com/file/kwyAnRpZ/Ebook-2738img.html
http://mympx.org/Downloads
http://forums.whirlpool.net.au/archive/1537766
http://www.migear.biz/Downloads/MiGear_BSTE102_eBook_Upgrade_Tool_v1.rar
http://mympx.org/forum/firmware/45967-rk2738-4.html
http://www.gear2go.biz/categories/Software-upgrades/

Moreover, while you may end up with the wrong language they (the various firmware revisions) all seem to be based on the same core which means that even if you end up seeing strange characters you can almost always set it back to any arbitrary language. The irony though is that while there is a firmware update utility you need to tweak it (Hardware IDs which can be obtained from 'lsusb' under Linux and 'Device Manager' in Windows) in order to get things right.

http://www.ozbargain.com.au/node/70439

There's clearly no 'perfect firmware' out there at the moment though. I've ended up using firmware from another Chinese clone which oddly enough had better hardware (more RAM, Flash memory, FM radio, TV-out, and also a larger battery) than my device. This led to be explore the actual data sheets, various PCBs, and SDKs for this chip. Most of the time the data sheets indicated that only minor modifications/additions needed to be made to add these capabilities (I actually thought about adding more flash memory from a USB flash drive after discovering the physical size of the chips on the board and in my flash drive were identical. Try to format the flash using NTFS and not FAT16/FAT32 as it will be more resistant against potential filesystem corruption. You'll know why if you've compared these filesystems on USB flash drives previously and have not ejected properly.). While there doesn't seem to be support for Android/Linux, Lexand seemed to have released a device that uses Android/Linux and is also based on the RK2738 (here's hoping someone uploads the firmware).

http://gnn-components.com/Fuzhou_Rockchip_Electronics_Co___Ltd_-22-488.aspx
http://ananda.en.alibaba.com/product/494388542-0/7inch_Rockchip_2738_ebook_reader.html
http://tablet-news.com/2012/07/05/lexand-lt-127-and-lt-227-color-e-readers-officially-announced/
http://mympx.org/forum/general-discussion/44608-rockchip-sdk-working-links.html
http://www.mp4nation.net/forum/f27/rockchip-programming-14769/
http://www.podchasov.ru/rk27/
http://mympx.org/forum/firmware/45967-rk2738-2.html
http://mympx.org/forum/general-discussion/43348-hooray-rockchip-sdk.html
http://wiki.mobileread.com/wiki/Skytex_Primer
thttp://mympx.org/forum/general-discussion/43348-hooray-rockchip-sdk-28.html
http://www.androidtablets.net/forum/rockchip-based/439-how-unpack-repack-custom-firmwares-rockchip-rk28xx.html
http://wiki.archosfans.com/index.php?title=Dump_your_Home_Tablet_rom_and_create_a_custom_rom&action=edit&oldid=141291
http://forum.archosfans.com/viewtopic.php?f=59&t=33946
http://www.slatedroid.com/
http://en.pudn.com/downloads135/sourcecode/embed/detail575860_en.html
http://www.mobileread.mobi/forums/showthread.php?t=111836&page=3 
http://forum.archosfans.com/viewtopic.php?f=59&t=33946

While there are SDKs out there development doesn't seem to be simple especially for the 27xx series. A lot of information has needed to be reverse engineered (Rockchips don't seem to be interested in Open Source development at the moment based on what I've read.) and even then there seems to have been measures taken to reduce the chances of end user tampering. Files have clearly been 'packed' and possibly encrypted with 28xx/29xx series also having similar protection.

http://alemaxx.al.funpic.de/rk27/rkwfwpatch.html
Even viewing hidden partitions/backing up the actual firmware itself was a seeming mystery with many people just guessing at what the magical filename should be to make the partitions magically appear (I used the following command sequence to figure this out, 'strings RK2738.img | grep -i tag > tags'. Mine was 'HTC_E01.Tag' though this will obviously depend on you having a copy of the image in the first place.).

Moreover, unlike the 26xx series you can't just modify files on the hidden partitions itself. You need to unpack the image, modify the files, repack it and write the firmware to make the changes 'stick',

mkdir /media/ebook
mount -o loop BSTE102.img /media/ebook/
umount /media/ebook/

else you'll need to use something like WinRAR or WinImage under Windows.

With the firmware being relatively tedious or difficult to modify I wonder whether something like Rockbox/OpenInkpot are more viable options given time and your desired use for your device...

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Tuesday, July 24, 2012

The Hard Drive Resurrection!

My first hard drive 'incident' occurred years ago when a friend moved a hard drive of mine while it was still working. The result was 'smoky' and resulted in a drive that would not spin up and a fried controller board. Switching boards for data recovery was simple though as the drive was of desktop size and the model fairly common. 

Since then I've sufferred all sorts of drive failures from virtually all drive manufacturers. While I haven't lost much data (I backup regularly) it has been annoying and I've learnt about hard drive technology along the way. Last year I had another drive failure. This time it was a laptop sized drive with a supposedly 'seized spindle'. I tried 'freezing it' in a sealed container and it seemed to spin up long enough for me to recover the data but after one power up that was basically all the activity that I ever saw again from this particular drive. Since I recovered the data I didn't bother with further experimentation. Recently though, some other work in data recovery brought this drive back into my mind. I opened up the drive and was reminded that even though hard drive technology has been around for decades it has definitely evolved/become more refined. Drive designs from a decade ago there were much more distinctive between drive manufacturers than now and there were sometimes aspects of drive design which could have easily been improved (such as shock absorption and chip placement). Over time, its become clearer that drives have become much more refined though and manufacturers have converged upon some similar design principles. When I opened this particular drive it was obvious how much thought was put into it; there were stickers to prevent improper screw placement (some screws could have protruded directly onto the underside of the drive platter if you weren't careful), contingencies were made to deal with the possible build up of internal condensation/contamination (packet of what appeared to be silica/cotton?), and even minor design changes to head parking areas to reduce the shock of drive movement to the extreme edges of the disc platter themselves.

Anyhow, it seems clear that there are several methods when dealing with seized spindles. One involves using a power drill, another blunt force, another involves a specialised tool to help re-align the platter/bearing bundle. I decided to use a stylus from my old Palm Vx. It seemed to work well and I was at least able to get my drive spinning relatively freely again. The next problem that I faced was head/servo movement. I checked my re-assembly several times and everything seemed to be in check. However, after careful examination I realised that a cable that led from the controller board to the head was deformed/broken which meant that power could not be sent to an electromagnet at the end of the head assembly which is ultimately used to control head alignment over the disc platters. After re-alignment head movement seemed to be back. While its clear what the problem is, I'm not sure how much further I can push this with my existing equipment. The connections/wires that need to be fixed are basically the size of pin heads. It will take a microscope and a bit of luck to be able to accurately re-connect the relevant connections.

Moreover, unlike previously where switching parts seemed to be quite simple I'm discovering that drive recovery nowadays is far more evolved than it used to be. While some parts are interchageable others aren't so easy. Based on some research it seems as though some drives may have begun to place part or all of the firmware on the actual drive itself which makes parts transfer not so simple. The firmware from the old drive needs to be extracted or procured from another location (can be trivial or extremely difficult depending on the situation/manufacturer as some publish tools/software to do precisely this while others rarely publish any supporting documentation/software at all).

I suspect the best/simplest method may be sourcing another drive for its head assembly (if you don't have specialised head removal tools you're best choice is turning the drive upside down and pushing it towards the back wall of the drive enclosure to remove it and enhance your chances of removing it without causing significant drive damage)(Obviously, you've discovered by now that you can often get by without having to resort to specialised tools a lot of the time. However, like general 'tradesman' it is far easier if you have them and you need to take extra care if you don't have them.). I'd like to know whether they alter drive heads based on drive density though? Clearly, when switching from single to multi-platter configurations this will be the case. How about switching from a single platter discs of different density though? Surely, efficiencies in mass production should mean that you use the same heads while altering only the platters, firmware, controller card, etc?

As an aside I've noticed a lot of good deals for SSDs of late. However, it's also clear that some of the drives on offer have a history of data loss as a result of dodgy controllers, firmware, etc... For the moment, I would do my homework before purchasing an SSD, hold off on the technology while it matures, and/or just use it for non-critical/read only purposes.

A word of note, if you're working with this type of equipment you should primarily be thinking about the most minimal way to get things going again rather than seeking the most elegant solution out there (at least initially). I recall working an phone that had sufferred from water damage. Everything seemed to be fine but the power switch needed to be replaced. While I managed to find a replacement from Jaycar I tried to get too cute with the repair and ended up damaging the replacement switch. Luckily, the switch was only 95 cents and the phone was relatively inexpensive.

http://en.wikipedia.org/wiki/Hard_disk_drive

http://www.overclockers.com/do-it-yourself-hard-disk-repair/
http://superuser.com/questions/44318/how-do-i-remove-a-mybooks-wd-smartware-virtual-cd-from-my-desktop
http://club.myce.com/f138/access-hard-drives-firmware-257428/#.UAoich-eVG0
http://freemyipod.org/wiki/Extracting_firmware

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

The World is Full of Software Bugs

It seems as though bugs may have developed an attraction to me of late. I've discovered that 'pcmanfm' doesn't handle unmounting of drives completely cleanly and that you need to manually kill processes regularly sometimes. I've also discovered that Windows Media Player (with my configuration at least) only seems to work when the TV tuner is inserted on the original USB port that it was configured on (else it will indicate that there are no tuners currently available. Obviously, you can attempt to re-configure the tuner on another USB port but that's beside the point. This is strange behaviour.). MultibootUSB needs 32-bit of 7-Zip to be installed to be run (even if you have installed the 64-bit version on a 64-bit Windows system). Otherwise, you end up with a never ending series of errors. Tip, you need to kill MultibootUSB first before killing 7-Zip else it will keep on trying to re-spawn that process.


While the following is not a bug I find it 'annoying'. The versions of Acronis TrueImage distributed by Seagate/Western Digital are incompatible (retail and other version are fine). I've obviously tried various Open Source options in the past but none come near the performance/compression balance that currently exists in this product and several other proprietary options.

While searching for a new external hard drive I came across the following...

http://www.phonenews.com/toshiba-acknowledges-macbook-woes-canvio-usb-3-0-hard-drives-18699/
http://www.theregister.co.uk/2012/07/23/100w_usb_power_delivery_specification/

I was recently playing around with the idea (and the practice) of turning Android phones into servers. It was not without its difficulties though. On most mobile computing devices there are forms of so called speed stepping technologies to help increase battery life. It's obviously re-appeared on Android as well but not without some of the problems that plagued other platforms. I once recall using a power control utility application on my old Android phone which underclocked it to such an extent (1/3 of it's full capacity) that I couldn't answer phone calls because there weren't enough CPU cycles for user space applications (such as unlocking the phone itself so that I could take a call) while playing music. Admittedly, the hardware specifications were minimal (it was an extremely early and inexpensive Android phone) but I would have thought a bit more thought would have gone into it prior to deployment (I 'accepted' the 'default settings' believing that that would have been adequate).

I obviously tried SSHDroid but like others I came across what were seemingly stability problems. Upon further examination though I found a lot about wireless and power control technologies. I think a lot of the problems that I was experiencing were as a consequence of power saving software (the above will likely make more sense to you now) which may have led to SSHDroid shutting down randomly and regularly. However, in my research I also came across a file transfer application called SwiFTP. In it, was option to shutdown most power saving behaviour. By enabling this, I've seen been able to achieve relatively stable connections (hours at a time).


You can lock up (somewhat) your Android phone by using firewall such as DroidWall.


Strongly suggest you have reliable equipment if you do ANY wireless experimentation. Obviously firmware changes can have significant impacts upon devices. One thing I underestimated though was how much of an impact 'raw power' played on connection stability. In the past (and recently) I was playing around with the idea of deliberately changing architecture to maintain wireless security (as opposed to relying on pure 'Faraday Cages' and other anti-TEMPEST techniques). By using the concepts of absorption, superposition, and reflection we can manipulate wireless signal pathways (very similar to some of the techniques that are used to develop low visibility/stealth aircraft). The results of these experiments indicate that putting this theory into practice will be less trivial than I had originally anticipated though (the intensity of a signal is conversely proportional to the inverse square of the distance between the source and destination if I recall my physics correctly).

Tuesday, July 3, 2012

iPod Nano Device Sanitisation

Continuing my work on my, "Cloud and Internet Security" report. I'll revise my earlier estimate and say that its likely to be 500+ pages though the scope will depend on other factors. One of the issues that I wanted to explore was mobile device backup and sanitisation. In particular my iPod Nano. It sounds easy but if you haven't got a recent backup,  you're aware of how strongly iTunes and iPod devices are integrated, and have taken a look at the file directory structure of an iPod you'll realise just how awkward this can be.

Actual music files are stored on the device in the following format:
/media/sdd1/iPod_Control/Music/F[:number:]{2}/[:alpha:]{4}.mp3

The command, "file ZRJR.mp3" yields the following:
ZRJR.mp3: Audio file with ID3 version 2.2.0, contains: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo


knoppix@system:~/iPod_Control/iTunes/iTunes Library.itlp$ file *
Dynamic.itdb:       SQLite 3.x database
Extras.itdb:        SQLite 3.x database
Genius.itdb:        SQLite 3.x database, user version 2
Library.itdb:       SQLite 3.x database, user version 23
Locations.itdb:     SQLite 3.x database
Locations.itdb.cbk: data

http://www.macworld.com/article/1139974/itunes_files.html

Plugging the device in under Linux and mounting as as a USB mass storage device works but so does iPod/iPhone Explorer under Windows as well (though they have some quirks that need to be fixed (I picked up some unhandled exception during my experimentation)). They remind me a lot of Explore2FS which we had to use in the early days of Windows/Linux interoprability. They also allow you to drag and drop though conversion from stored file format to MP3 will take some time. 

TeraCopy (a more optimal version of Windows Explorer's copy functionality) sufferred from a number of stalls and the only notification that I had was a balloon popup on the toolbar indicating that it was due to the process of conversion. Would have liked to see something more informative regarding progress.

Some of the main database table structures extracted from various onboard files are provided below (This was extracted by using a SQLite Browser/Manager and then exporting it to SQL code.).

CREATE TABLE album (pid INTEGER NOT NULL, kind INTEGER, artwork_status INTEGER, artwork_item_pid INTEGER, artist_pid INTEGER, user_rating INTEGER, name TEXT, name_order INTEGER, all_compilations INTEGER, feed_url TEXT, season_number INTEGER, is_unknown INTEGER DEFAULT 0, has_songs INTEGER DEFAULT 0, has_music_videos INTEGER DEFAULT 0, sort_order INTEGER DEFAULT 0, artist_order INTEGER DEFAULT 0, has_any_compilations INTEGER DEFAULT 0, sort_name TEXT, artist_count_calc INTEGER DEFAULT 0 NOT NULL, PRIMARY KEY (pid));

CREATE TABLE artist (pid INTEGER NOT NULL, kind INTEGER, artwork_status INTEGER, artwork_album_pid INTEGER, name TEXT, name_order INTEGER, sort_name TEXT, is_unknown INTEGER DEFAULT 0, has_songs INTEGER DEFAULT 0, has_music_videos INTEGER DEFAULT 0, PRIMARY KEY (pid));

CREATE TABLE avformat_info (item_pid INTEGER NOT NULL, sub_id INTEGER NOT NULL DEFAULT 0, audio_format INTEGER, bit_rate INTEGER DEFAULT 0, sample_rate REAL DEFAULT 0, duration INTEGER, gapless_heuristic_info INTEGER, gapless_encoding_delay INTEGER, gapless_encoding_drain INTEGER, gapless_last_frame_resynch INTEGER, analysis_inhibit_flags INTEGER, audio_fingerprint INTEGER, volume_normalization_energy INTEGER, PRIMARY KEY (item_pid,sub_id));

CREATE TABLE category_map (id INTEGER NOT NULL, category TEXT NOT NULL, PRIMARY KEY (id), UNIQUE (category));
CREATE TABLE composer (pid INTEGER NOT NULL, name TEXT, name_order INTEGER, sort_name TEXT, is_unknown INTEGER DEFAULT 0, has_music INTEGER DEFAULT 0, PRIMARY KEY (pid));
CREATE TABLE genre_map (id INTEGER NOT NULL, genre TEXT NOT NULL, genre_order INTEGER DEFAULT 0, is_unknown INTEGER DEFAULT 0, has_music INTEGER DEFAULT 0, artist_count_calc INTEGER DEFAULT 0 NOT NULL, album_count_calc  INTEGER DEFAULT 0 NOT NULL, PRIMARY KEY (id), UNIQUE (genre));

CREATE TABLE item (pid INTEGER NOT NULL, revision_level INTEGER, media_kind INTEGER DEFAULT 0, is_song INTEGER DEFAULT 0, is_audio_book INTEGER DEFAULT 0, is_music_video INTEGER DEFAULT 0, is_movie INTEGER DEFAULT 0, is_tv_show INTEGER DEFAULT 0, is_ringtone INTEGER DEFAULT 0, is_voice_memo INTEGER DEFAULT 0, is_book INTEGER DEFAULT 0, is_rental INTEGER DEFAULT 0, is_itunes_u INTEGER DEFAULT 0, is_digital_booklet INTEGER DEFAULT 0, is_podcast INTEGER DEFAULT 0, date_modified INTEGER DEFAULT 0, date_backed_up INTEGER DEFAULT 0, year INTEGER DEFAULT 0, content_rating INTEGER DEFAULT 0, content_rating_level INTEGER DEFAULT 0, is_compilation INTEGER, is_user_disabled INTEGER DEFAULT 0, remember_bookmark INTEGER DEFAULT 0, exclude_from_shuffle INTEGER DEFAULT 0, part_of_gapless_album INTEGER DEFAULT 0, chosen_by_auto_fill INTEGER DEFAULT 0, artwork_status INTEGER, artwork_cache_id INTEGER DEFAULT 0, start_time_ms REAL DEFAULT 0, stop_time_ms REAL DEFAULT 0, total_time_ms REAL DEFAULT 0, total_burn_time_ms REAL, track_number INTEGER DEFAULT 0, track_count INTEGER DEFAULT 0, disc_number INTEGER DEFAULT 0, disc_count INTEGER DEFAULT 0, bpm INTEGER DEFAULT 0, relative_volume INTEGER, eq_preset TEXT, radio_stream_status TEXT, genius_id INTEGER DEFAULT 0, genre_id INTEGER DEFAULT 0, category_id INTEGER DEFAULT 0, album_pid INTEGER DEFAULT 0, artist_pid INTEGER DEFAULT 0, composer_pid INTEGER DEFAULT 0, title TEXT, artist TEXT, album TEXT, album_artist TEXT, composer TEXT, sort_title TEXT, sort_artist TEXT, sort_album TEXT, sort_album_artist TEXT, sort_composer TEXT, title_order INTEGER, artist_order INTEGER, album_order INTEGER, genre_order INTEGER, composer_order INTEGER, album_artist_order INTEGER, album_by_artist_order INTEGER, series_name_order INTEGER, comment TEXT, grouping TEXT, description TEXT, description_long TEXT, collection_description TEXT, copyright TEXT, track_artist_pid INTEGER DEFAULT 0, physical_order INTEGER, has_lyrics INTEGER DEFAULT 0, date_released INTEGER DEFAULT 0, PRIMARY KEY (pid));

CREATE TABLE item_to_container (item_pid INTEGER, container_pid INTEGER, physical_order INTEGER, shuffle_order INTEGER);

CREATE TABLE video_info (item_pid INTEGER NOT NULL, has_alternate_audio INTEGER, has_subtitles INTEGER, characteristics_valid INTEGER, has_closed_captions INTEGER, is_self_contained INTEGER, is_compressed INTEGER, is_anamorphic INTEGER, is_hd INTEGER, season_number INTEGER, audio_language INTEGER, audio_track_index INTEGER, audio_track_id INTEGER, subtitle_language INTEGER, subtitle_track_index INTEGER, subtitle_track_id INTEGER, series_name TEXT, sort_series_name TEXT, episode_id TEXT, episode_sort_id INTEGER, network_name TEXT, extended_content_rating TEXT, movie_info TEXT, PRIMARY KEY (item_pid));


My guess is that they used the:

/media/sdd1/iPod_Control/Music/F[:number:]{2}/[:alpha:]{4}.mp3

structure as a means of avoiding filename clashes. iTunes basically manages various files and databases to keep track of where everything is. While its clear that there are alternatives they are not always perfect (I manually deleted a file from a my iPod and one of them was unable to correctly update the database. There has been some difficulty in the Open Source world with reverse engineering the details obviously and one of the solutions I've seen was adding/removing files using another program and then plugging it into iTunes to have it update its internal databases but you have to wonder about the logic of this as you're just adding another moving part to the already complex mix/interplay.) and have to be reverse engineered which can be time consuming and difficult as Apple continue to increase their use of anti-reverse engineering technologies (The more you dig the more you realise how drastically some organisation's thinking can veer off of what you believe to the most sensible/elegant option. During my sanitisation experiment a number of files kept on showing as being recoverable. My guess is that it has to do with the way in which files/directories are extracted and manipulated rather than remnant data though. You also obviously need to factor in design compromises and commercial considerations as well.).

CopyTransManager
CopyTransDoctor


It seems clear that the device itself is built off of industry standard software/hardware. Brilliantly integrated and packaged though. Underlying filesystem format is either HPFS or FAT32 depending on the operating system from which the device is setup from.

Tried using various wiping programs. However, it soon became clear that there  other issues at play here. Almost like there's another layer in between the operating system and the underlying filesystem. Not sure whether this is limited to my system (I have a Windows system that is dedicated to pure experimentation so I can't be entirely sure about it being true to other's experiences. I seemed to have no issues with interfacing with the underlying filesystem on Linux but that's not a 'standard environment'.) though.

AxCrypt - Shred and Delete
Shredding of ''????" failed,
A device attacked to the system is not functioning.

Eraser - Erase
Error - The file or directory is not a reparse point. (Exception from HRESULT: 0x80071126)

A file or directory can contain a reparse point, which is a collection of user-defined data. The format of this data is understood by the application which stores the data, and a file system filter, which you install to interpret the data and process the file. When an application sets a reparse point, it stores this data, plus a reparse tag, which uniquely identifies the data it is storing. When the file system opens a file with a reparse point, it attempts to find the file system filter associated with the data format identified by the reparse tag. If a file system filter is found, the filter processes the file as directed by the reparse data. If a file system filter is not found, the file open operation fails.

iPod Explorer - Simple Deletion
Obvious that one deletion of file is possible but it doesn't deal with updating the meta-data/database. It still appears in the menuing system but attempting to play results in nothing, not even an error.

Obviously, after deletion I tried various methods of file recovery to see just how effective some of the mechanisms I employed were. As with most standard FAT based filesystems if there were no other intervention 100% file recovery is almost always possible. You need to use a wiping program to truly defend your iPod or other mobile devices against attack from computer forensics programs. 

root@system:/media/sdc1# photorec /log /debug /d photorec
PhotoRec 6.11, Data Recovery Utility, April 2009
Christophe GRENIER
http://www.cgsecurity.org

Disk /dev/sdd - 7889 MB / 7523 MiB (RO) - Apple iPod
     Partition                  Start        End    Size in sectors
 1 P FAT32                    0   1  3   127 204 49    1926015 [USER'S IPOD]
168 files saved in photorec directory.
Recovery aborted by the user.
mp3: 148 recovered
tx?: 10 recovered
sqlite: 4 recovered
txt: 3 recovered
mov: 2 recovered
gz: 1 recovered
[ Quit ]

root@system:/media/sdc1# vim /etc/scalpel/scalpel.conf
# MPEG Video
mpg     y       50000000        \x00\x00\x01\xba        \x00\x00\x01\xb9
mpg     y       50000000        \x00\x00\x01\xb3        \x00\x00\x01\xb7

root@system:/media/sdc1# scalpel -v /dev/sdd1 -o /media/sdc1/scalpel
/dev/sdd1:   9.8% |********|  740.0 MB  2:05:55 ETAOPENING /media/sdc1/scalpel/mpg-1-0/00003091.mpg
/dev/sdd1:  10.0% |*******|  750.0 MB  2:06:05 ETAOPENING /media/sdc1/scalpel/mpg-1-0/00003093.mpg
CLOSING /media/sdc1/scalpel/mpg-1-0/00003091.mpg
^C^C^C
Kill signal detected. Cleaning up...
CLOSING /media/sdc1/scalpel/mpg-1-0/00003090.mpg
^C
Kill signal detected. Cleaning up...
CLOSING /media/sdc1/scalpel/mpg-1-0/00003089.mpg
^C
Kill signal detected. Cleaning up...
CLOSING /media/sdc1/scalpel/mpg-0-0/00000055.mpg
OPENING /media/sdc1/scalpel/mpg-1-0/00003092.mpg
CLOSING /media/sdc1/scalpel/mpg-1-0/00003092.mpg
/dev/sdd1:  10.1% |*********|  760.0 MB  2:04:56 ETACleaning up...
 Caught signal: Interrupt. Program is terminating early 

Erase Free Space (Eraser) option has reduced the significantly the chances of file recovery even though file integrity recovery indicators state (CopyTransDoctor) that 100% recovery is possible this is certainly not the case. My results indicate that while partial wiping is possible it requires specialised tools and/or knowledge (I've seen some mobile applications that are specifically designed for this purpose) and clearly if you have raw/jailbroken access to the file system you have many options/utilities available to you.

Not surprisingly given these issues, Apple and others have come up with their own wiping/encryption functionality. 


Simulated the following wiping (free space only. To run on the entire device just drop the digit.) algorithms,
- British HMG IS5 (3 passes)
- US DoD 5220.22-M (8-306./E)(3 passes)
by running the following:

dd if=/dev/zero of=/media/sde1/ipod.wipe
cat /dev/zero | tr '\0' '\1' | dd of=/media/sde1
dd if=/dev/urandom of=/media/sde1/ipod.wipe

Note that you will run into the 4GB filesystem limitation with FAT32 so just create a another file to get around this problem. Namely,

dd if=/dev/zero of=/media/sde1/ipod.wipe
dd if=/dev/zero of=/media/sde1/ipod.wipe1
dd if=/dev/zero of=/media/sde1/ipod.wipe2
etc...

It seemed to fairly obvious that a single wipe (British HMG IS5 (1 pass) or US DoD 5220.22-M (8-306./E)(1 pass) which basically amounts to a single pass of zeros) was enough to throw off the various programs that I was using to examine the device though (I was only using free and Open Source tools to simulate a worst case scenario.).

- scalpel
- photorec
- testdisk
- Recuva
- Glary Utilities
- diskinv

Not surprisingly, ports, and installations of Linux have been attempted. The main limitations seem to be the anti-reverse engineering technologies implemented by Apple though.



Given the fact that it basically is a USB storage device you can use a lot of standard utilities on the device such as DBAN and BCWipe.


Luckily recovery mode is there for you to be able to restore functionality most of the time (It's fairly easy to trigger. I obviously corrupted the filesystem a number of times through my experiments with dd and also attempting to reformat, use other programs, and operating systems on my device. Just plug it into a computer running iTunes and it'll do a complete reset of the device for you.).

http://www.tuaw.com/2010/12/31/discovering-ipad-nano-recovery-mode/

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Ender 3v2 and Ender 3vSE 3D Printer Maintenance, Klipper Firmware Upgrade, and More

Ender 3v2 and Ender 3vSE 3D Printer Maintenance: - after using a 3D printer for a few months now it's started to play up. The limit ...