Feeds

The Netbook Newbie's Guide to Linux

Back to the Bluez

Build a business case: developing custom apps

Acer's Bluetooth Patch: is it Evil?

The official Acer 'Bluetooth Patch' presents itself as a script file. The abiding Unix advantage of doing a lot of stuff using plain text shell scripts is that they're transparent - you can read 'em to find out what they think they're doing. All the scripts in /etc/init.d that start up the various Linux services, for example, work along these lines. But not this 'Bluetooth Patch' script.

Bluetooth Patch

Some of it is readable. The opening comment line says that it's been constructed with a utility called Makeself. Makeself is a utility devised by Stéphane Peter that makes .tgz files self-extractable. The .tgz files are embedded in the Makeself scripts, so although they run like scripts, they're mostly full of binary code that completely conceals their actions.

At least that's how it seemed. I dropped an email to Stéphane suggesting that short of setting up a VMware Linpus sandbox, running the script and then walking through the whole system with find, I couldn't think of any way of determining the workings of this kind of script that can create executables or other scripts at will, and then run them. So, is Makeself evil? I asked him.

No, he says. No less so than any other installer. He explained that you can quiz a Makeself file from the command line about its contents:

[user@localhost bluetooth.sh]$ ./bluetooth.sh --info
Identification: install bluetooth patch
Target directory: bluetooth
Uncompressed size: 9768 KB
Compression: gzip
Date of packaging: Sat Oct 11 14:37:37 CST 2008
Built with Makeself version 2.1.4 on linux-gnu
Build command was: /usr/bin/makeself.sh \
    "bluetooth" \
    "bluetooth.sh" \
    "install bluetooth patch" \
    "./install.sh"
Script run after extraction:
     ./install.sh
bluetooth will be removed after extraction

Stephane goes on to say: "To examine the contents of the archive itself, and thus get a better idea of what happens, you can use the --noexec and --target options to simply extract the files, ie.

sh makeself.run --noexec --target /tmp/archive

You can then just peruse the contents of /tmp/archive in this example."

The essential guide to IT transformation

More from The Register

next story
Reg man looks through a Glass, darkly: Google's toy ploy or killer tech specs?
Tip: Put the shades on and you'll look less of a spanner
So, Apple won't sell cheap kit? Prepare the iOS garden wall WRECKING BALL
It can throw the low cost race if it looks to the cloud
One step closer to ROBOT BUTLERS: Dyson flashes vid of VACUUM SUCKER bot
Latest cleaner available for world+dog in September
Samsung Gear S: Quick, LAUNCH IT – before Apple straps on iWatch
Full specs for wrist-mounted device here ... but who'll buy it?
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Now that's FIRE WIRE: HP recalls 6 MILLION burn-risk laptop cables
Right in the middle of Burning Mains Man week
Apple's iWatch? They cannae do it ... they don't have the POWER
Analyst predicts fanbois will have to wait until next year
HUGE iPAD? Maybe. HUGE ADVERTS? That's for SURE
Noo! Hand not big enough! Don't look at meee!
AMD unveils 'single purpose' graphics card for PC gamers and NO ONE else
Chip maker claims the Radeon R9 285 is 'best in its class'
prev story

Whitepapers

Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Backing up distributed data
Eliminating the redundant use of bandwidth and storage capacity and application consolidation in the modern data center.
The essential guide to IT transformation
ServiceNow discusses three IT transformations that can help CIOs automate IT services to transform IT and the enterprise
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.