Smuggle mischievous JavaScript into WinRAR archives? Sure, why not

Proof of concept could lead to nasty phish

The popular WinRAR compression software can be abused to produce self-extracting archives that execute smuggled-in JavaScript code when decompressed.

A proof-of-concept exploit to pull off the trick has been published, and its creator reckons it works on all versions of WinRAR.

It's not quite the end of the world, though: only HTML and JavaScript hidden within the archive is parsed and executed, rather than arbitrary machine code. And being a self-extracting archive, it's basically a .exe file you're asking people to download and trust to run, anyway.

But it's pretty amusing that this kinda flaw exists.

WinRAR has been a popular shareware unzipping tool for Windows users over the last two decades. It is plugged heavily thanks to many reviews by software download sites like CNET and Softpedia.

Iranian researcher Mohammad Reza Espargham revealed the hole on the Full Disclosure security mailing list.

"The vulnerability allows unauthorised remote attackers to execute system specific code to compromise a target system," Espargham told Full Disclosure.

"The issue is located in the text and icon function of the 'text to display in [the self-extracting archive's]' window module. Remote attackers are able to generate [their] own compressed archives with malicious payloads to execute system specific codes for compromise."

Youtube video

The HTML and JavaScript injected into WinRAR self-extracting archives will execute when the file is decompressed; these scripts can pull in malicious executables from the internet and run them, or cause other mischief – perhaps even exploit a vulnerability in whatever JavaScript engine is being used.

The proof-of-concept code downloads and runs the SSH tool Putty.exe, by way of example.

If you can find suckers who will trust a .exe labelled as self-extracting archive over any other program they download from the web, then you can trick them into running your smuggled JavaScript.

MalwareBytes researcher Pieter Arntz says the proof-of-concept code needed subtle tweaking for it to work properly.

"The proof-of-concept requires some trivial changes before I got it to work," Arntz said, but that might have been down to a Perl version conflict. ®

Editor's note: This story has been updated to clarify what's possible when exploiting the flaw.

Similar topics

Other stories you might like

  • Robotics and 5G to spur growth of SoC industry – report
    Big OEMs hogging production and COVID causing supply issues

    The system-on-chip (SoC) side of the semiconductor industry is poised for growth between now and 2026, when it's predicted to be worth $6.85 billion, according to an analyst's report. 

    Chances are good that there's an SoC-powered device within arm's reach of you: the tiny integrated circuits contain everything needed for a basic computer, leading to their proliferation in mobile, IoT and smart devices. 

    The report predicting the growth comes from advisory biz Technavio, which looked at a long list of companies in the SoC market. Vendors it analyzed include Apple, Broadcom, Intel, Nvidia, TSMC, Toshiba, and more. The company predicts that much of the growth between now and 2026 will stem primarily from robotics and 5G. 

    Continue reading
  • Deepfake attacks can easily trick live facial recognition systems online
    Plus: Next PyTorch release will support Apple GPUs so devs can train neural networks on their own laptops

    In brief Miscreants can easily steal someone else's identity by tricking live facial recognition software using deepfakes, according to a new report.

    Sensity AI, a startup focused on tackling identity fraud, carried out a series of pretend attacks. Engineers scanned the image of someone from an ID card, and mapped their likeness onto another person's face. Sensity then tested whether they could breach live facial recognition systems by tricking them into believing the pretend attacker is a real user.

    So-called "liveness tests" try to authenticate identities in real-time, relying on images or video streams from cameras like face recognition used to unlock mobile phones, for example. Nine out of ten vendors failed Sensity's live deepfake attacks.

    Continue reading
  • Lonestar plans to put datacenters in the Moon's lava tubes
    How? Founder tells The Register 'Robots… lots of robots'

    Imagine a future where racks of computer servers hum quietly in darkness below the surface of the Moon.

    Here is where some of the most important data is stored, to be left untouched for as long as can be. The idea sounds like something from science-fiction, but one startup that recently emerged from stealth is trying to turn it into a reality. Lonestar Data Holdings has a unique mission unlike any other cloud provider: to build datacenters on the Moon backing up the world's data.

    "It's inconceivable to me that we are keeping our most precious assets, our knowledge and our data, on Earth, where we're setting off bombs and burning things," Christopher Stott, founder and CEO of Lonestar, told The Register. "We need to put our assets in place off our planet, where we can keep it safe."

    Continue reading

Biting the hand that feeds IT © 1998–2022