News for hackers. Stuff that matters.
Re:Billion laughs attack by arkadiyt on Sunday January 06, 2019 @03:57PM (#18840659)
If you're parsing XML then external entities (allowing local file inclusion or server side request forgery) are much more dangerous for you than this denial of service. OWASP has a cheat sheet for disabling XXE on a few different parsers:

https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Pr...

Re:Billion laughs attack by robko on Sunday January 06, 2019 @05:38PM (#18841197)
Interestingly, many browsers are still susceptible to this attack, for example when used in SVG files (WARNING: might crash your browser and/or operating system): https://jsfiddle.net/e3guLn08/
Re:Billion laughs attack by kazinator on Monday January 07, 2019 @06:25AM (#18844371)
Browsers are susceptible to a server that generates an infinite HTML page (e.g. CGI shell script calling "yes <arg>"), and also to thing called JavaScript that can eat all your memory programmatically (and does exactly so on a regular basis).
Re:Billion laughs attack by berbec on Sunday January 06, 2019 @04:03PM (#18840695)
Is this just a 21st century zipbomb?

0: https://en.m.wikipedia.org/wiki/Zip_bomb

Re:Billion laughs attack by tdurden on Sunday January 06, 2019 @05:20PM (#18841115)
The linked Wikipedia entry specifically references zip bombs as "a similar attack utilizing zip archives"
Re:Billion laughs attack by koolba on Sunday January 06, 2019 @06:17PM (#18841384)
Pretty sure this existed in the 20th century too.
Re:Billion laughs attack by AdmiralAsshat on Sunday January 06, 2019 @04:25PM (#18840812)
And here I thought this would be a variant of the hypothetical Chinese chair attack: https://www.straightdope.com/columns/read/142/if-all-chinese...
Re:Billion laughs attack by kristianp on Sunday January 06, 2019 @08:08PM (#18841946)
A similar attack on CSS in browsers was shown recently here: https://cras.sh/
Re:Billion laughs attack by kazinator on Monday January 07, 2019 @06:21AM (#18844358)
> A "Billion laughs" attack should exist for any file format that can contain references, for example this YAML bomb:

C preprocessor?

  $ gcc -E - | wc
  #define EXP(X) X X X X X X X X X X X X X X X X
  #define LOL1 EXP(LOL)
  #define LOL2 EXP(LOL1)
  #define LOL3 EXP(LOL2)
  #define LOL4 EXP(LOL3)
  #define LOL5 EXP(LOL4)
  LOL5
  [Ctrl-D][Enter]
  11 1048588 4194376
Not normally considered a "file format", though. People don't open a C preprocessor attachment in their e-mail only to have some application grind their PC and crash. Or use this for RPC calls and whatnot.
Re:Billion laughs attack by sytringy05 on Sunday January 06, 2019 @11:49PM (#18842841)
This is loads of fun against batteries included web frameworks like rail, grails, play framework and so on. Not sure about now, but a few years ago basically all of them were susceptible to this and XXE and it was extremely difficult to disable in the XML parsers.
Re:Billion laughs attack by kerng on Sunday January 06, 2019 @09:49PM (#18842364)
This was been around for well over a decade. Interestingly though, denial of service is the less interesting issue that external entity parsing comes with. It can lead all the way to data exfiltration and remote code execution.
Re:Billion laughs attack by aussieguy1234 on Monday January 07, 2019 @01:43AM (#18843283)
Time to switch to JSON
Re:Billion laughs attack by kerng on Monday January 07, 2019 @11:50PM (#18853250)
Yep, there you can have direct code execution with some parses also... fun times. Creating objects out of untrusted data can be difficult.
Re:Billion laughs attack by mitchtbaum on Sunday January 06, 2019 @04:43PM (#18840916)
This is why I switched from yaml to scl. (Rust)

https://github.com/Keats/scl

EDIT: In spite of those who are downvoting my comment without even replying, I'm leaving it anyway; cause sharing good software outweighs whatever loss they intend to inflict.

Re:Billion laughs attack by henning on Sunday January 06, 2019 @05:09PM (#18841062)
Funny you should mention that. I found this while trying to decide which YAML library to use for Rust. https://github.com/dtolnay/serde-yaml/issues/53
Re:Billion laughs attack by mitchtbaum on Sunday January 06, 2019 @05:19PM (#18841102)
Yep, that issue and https://github.com/chyh1990/yaml-rust/issues/102 discuss the problem. But with scl we get a clean slate.
Re:Billion laughs attack by Midnightas on Sunday January 06, 2019 @05:02PM (#18841019)
Is Rust the Arch of programming languages?

"Btw I use Rust".

Re:Billion laughs attack by skocznymroczny on Monday January 07, 2019 @07:47AM (#18844716)
I think that Rust has captured many developers that previously used Javascript, so it's their first introduction to things like static typing. As a result they are amazed that a compiler can show them errors in their code before it's run.
Re:Billion laughs attack by mitchtbaum on Sunday January 06, 2019 @05:07PM (#18841052)
> the Arch of programming languages

I don't get your analogy.

Re:Billion laughs attack by yareally on Sunday January 06, 2019 @05:10PM (#18841068)
I think they were getting at this:

How do you know someone uses "X"? Don't worry, they'll tell you.

Re:Billion laughs attack by vuln on Sunday January 06, 2019 @05:14PM (#18841088)
How do you know if an individual is a vegan, does CrossFit, etc? Don't worry they'll tell you.
Re:Billion laughs attack by sverige on Sunday January 06, 2019 @06:48PM (#18841551)
An elderly lady comes into the police station crying hysterically. "I've just been mugged!" she cries.

The desk sergeant asks, "Can you describe the mugger?"

"Not really, he grabbed me from behind. I know he's a man, bigger than me, and he's vegan."

"How on earth do you know he's vegan?"

"He bloody told me!"

Re:Billion laughs attack by felipemnoa on Sunday January 06, 2019 @08:12PM (#18841954)
Re:Billion laughs attack by michaelcampbell on Monday January 07, 2019 @07:36AM (#18844679)
"...new iPhone..."