Opening windows in linux with sockets, bare hands and 200 lines of C
https://hereket.com/posts/from-scratch-x11-windowing/ [hereket.com]
2024-05-09 18:57
tags:
c
format
networking
programming
x11
In this post I want to create a single file C file program to open a windows inside Linux without using xlib or any similar libraries. The idea is to explore X11 protocol and see how it is used to interact with X server to create windows.
source: HN
500 Byte Images: The Haiku Vector Icon Format
http://blog.leahhanson.us/post/recursecenter2016/haiku_icons.html [blog.leahhanson.us]
2024-04-29 20:15
tags:
format
graphics
investigation
This blog post examines the details of the HVIF format using a hex editor and the canonical parser’s source code. In the process of dissecting an example icon, I’ll also show you an optimization bug in the icon image editor.
source: HN
How Not To Release Historic Source Code
https://www.os2museum.com/wp/how-not-to-release-historic-source-code/ [www.os2museum.com]
2024-04-28 02:30
tags:
development
format
retro
text
windows
For practical purposes, old source files are not text files. They are binary files, and must be preserved without modification. It is not OK to take an old source file and convert it to UTF-8. For one thing, UTF-8 didn’t even exist in the times of MASM 5.10 and Microsoft C 5.1, of course old tools can’t deal with it!
source: L
The WebP 0day
https://blog.isosceles.com/the-webp-0day/ [blog.isosceles.com]
2023-09-21 20:29
tags:
compression
exploit
format
fuzzing
programming
security
This means that someone, somewhere, had been caught using an exploit for this vulnerability. But who discovered the vulnerability and how was it being used? How does the vulnerability work? Why wasn’t it discovered earlier? And what sort of impact does an exploit like this have?
There are still a lot of details that are missing, but this post attempts to explain what we know about the unusual circumstances of this bug, and provides a new technical analysis and proof-of-concept trigger for CVE-2023-4863 (“the WebP 0day“).
The Most Dangerous Codec in the World: Finding and Exploiting Vulnerabilities in H.264 Decoders
https://wrv.github.io/h26forge.pdf [wrv.github.io]
2023-03-28 18:51
tags:
exploit
format
fuzzing
paper
pdf
security
turtles
video
Modern video encoding standards such as H.264 are a marvel of hidden complexity. But with hidden complexity comes hidden security risk. Decoding video in practice means interacting with dedicated hardware accelerators and the proprietary, privileged software components used to drive them. The video decoder ecosystem is obscure, opaque, diverse, highly privileged, largely untested, and highly exposed—a dangerous combination.
We introduce and evaluate H26FORGE, domain-specific infrastructure for analyzing, generating, and manipulating syntactically correct but semantically spec-non-compliant video files. Using H26FORGE, we uncover insecurity in depth across the video decoder ecosystem, including kernel memory corruption bugs in iOS, memory corruption bugs in Firefox and VLC for Windows, and video accelerator and application processor kernel memory bugs in multiple Android devices.
https://github.com/h26forge/h26forge
Exploiting aCropalypse: Recovering Truncated PNGs
https://www.da.vidbuchanan.co.uk/blog/exploiting-acropalypse.html [www.da.vidbuchanan.co.uk]
2023-03-18 19:40
tags:
android
compression
exploit
format
graphics
opsec
security
The Fastest GIF Does Not Exist
https://www.biphelps.com/blog/The-Fastest-GIF-Does-Not-Exist [www.biphelps.com]
2022-02-21 04:26
tags:
browser
format
graphics
turtles
It seems the reason for pushing values like 10ms back up to 100ms originates from a requirement to emulate the slowness of Netscape. Qt and Firefox source code comments both want to reduce CPU usage but since a value of 20ms is supported, I think they should just be clamping the value to 20ms instead. Or, don’t clamp the value at all! Modern browsers already render 20ms GIF frames just fine, and I’m not sure the “computers are too slow” argument holds up 30 years later.
source: HN
Open To Conversion
https://tedium.co/2021/11/10/10-forgotten-image-formats/ [tedium.co]
2021-11-11 02:59
tags:
format
graphics
Around this time 30 years ago, two separate working groups were putting the finishing touches on technical standards that would come to reshape the way people observed the world. One technical standard reshaped the way that people used an important piece of office equipment at the time: the fax machine. The other would basically reshape just about everything else, becoming the de facto way that high-quality images and low-quality memes alike are shared on the internet and in professional settings. They took two divergent paths, but they came from the same place: The world of compression standards. The average person has no idea what JBIG, the compression standard most fax machines use, is—but they’ve most assuredly heard about JPEG, which was first publicly released in 1992. The JPEG format is awesome and culture-defining, but this is Tedium, and I am of course more interested in the no-name formats of the world. Today’s Tedium discusses 10 image formats that time forgot. Hope you have the right conversion tool.
An Exploration of JSON Interoperability Vulnerabilities
https://labs.bishopfox.com/tech-blog/an-exploration-of-json-interoperability-vulnerabilities [labs.bishopfox.com]
2021-02-26 22:29
tags:
format
javascript
security
standard
text
turtles
The same JSON document can be parsed with different values across microservices, leading to a variety of potential security risks. If you prefer a hands-on approach, try the labs and when they scare you, come back and read on.
https://github.com/BishopFox/json-interop-vuln-labs/
source: HN
Floating-Point Formats
http://www.quadibloc.com/comp/cp0201.htm [www.quadibloc.com]
2020-12-13 07:05
tags:
compsci
format
math
reference
retro
systems
How to Abuse and Fix Authenticated Encryption Without Key Commitment
https://eprint.iacr.org/2020/1456 [eprint.iacr.org]
2020-12-13 06:03
tags:
crypto
format
paper
security
Authenticated encryption (AE) is used in a wide variety of applications, potentially in settings for which it was not originally designed. Recent research tries to understand what happens when AE is not used as prescribed by its designers. A question given relatively little attention is whether an AE scheme guarantees “key commitment’’: ciphertext should decrypt to a valid plaintext only under the key that was used to generate the ciphertext. As key commitment is not part of AE’s design goal, AE schemes in general do not satisfy it. Nevertheless, one would not expect this seemingly obscure property to have much impact on the security of actual products. In reality, however, products do rely on key commitment. We discuss three recent applications where missing key commitment is exploitable in practice. We provide proof-of-concept attacks via a tool that constructs AES-GCM ciphertext which can be decrypted to two plaintexts valid under a wide variety of file formats, such as PDF, Windows executables, and DICOM. Finally we discuss two solutions to add key commitment to AE schemes which have not been analyzed in the literature: one is a generic approach that adds an explicit key commitment scheme to the AE scheme, and the other is a simple fix which works for AE schemes like AES-GCM and ChaCha20Poly1305, but requires separate analysis for each scheme.
source: white
Reconstruct Instead of Validating
https://buttondown.email/cryptography-dispatches/archive/cryptography-dispatches-reconstruct-instead-of/ [buttondown.email]
2020-10-09 03:33
tags:
development
format
security
turtles
What I want to focus on is (2), because it’s a lesson we learned the hard way in cryptography and didn’t transfer effectively to the rest of security engineering.
One of my favorite cryptographic attacks is the Bleichenbacher‘06 signature forgery. I wrote up how it works when I found it in python-rsa, so again go read that, but here’s a tl;dr. When you verify an RSA PKCS#1 v1.5 signature, you get a ASN.1 DER structure wrapping the message hash that you need to check. If you don’t parse it strictly, for example by allowing extra fields or trailing bytes, an attacker can fake the signature. This was exploited countless times.
The lesson we learned was that instead of parsing the ASN.1 DER to extract the message hash, we should reconstruct the ASN.1 DER we’d expect to see, and then simply compare it byte-by-byte.
The same technique would have saved Vault.
DVD+R and DVD-R; What was that about?
https://www.youtube.com/watch?v=e1mJv9pxm7M [www.youtube.com]
2020-05-13 00:57
tags:
format
hardware
retro
storage
A format war within a format...
A Warm Welcome to ASN.1 and DER
https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/ [letsencrypt.org]
2020-04-28 00:35
tags:
format
networking
security
web
This document provides a gentle introduction to the data structures and formats that define the certificates used in HTTPS. It should be accessible to anyone with a little bit of computer science experience and a bit of familiarity with certificates.
“Gentle.”
source: L
Unintuitive JSON Parsing
https://nullprogram.com/blog/2019/12/28/ [nullprogram.com]
2019-12-30 23:30
tags:
compiler
format
javascript
Based on the title, could be just about anything...
The parser will not complain about leading zeros because JSON has no concept of leading zeros.
Unexpectedly a parse error, not a lex error.
Two New Tools that Tame the Treachery of Files
https://blog.trailofbits.com/2019/11/01/two-new-tools-that-tame-the-treachery-of-files/ [blog.trailofbits.com]
2019-11-04 07:25
tags:
defense
development
format
programming
release
security
swtools
turtles
Parsing is hard, even when a file format is well specified. But when the specification is ambiguous, it leads to unintended and strange parser and interpreter behaviors that make file formats susceptible to security vulnerabilities. What if we could automatically generate a “safe” subset of any file format, along with an associated, verified parser? That’s our collective goal in Dr. Sergey Bratus’s DARPA SafeDocs program.
We’ve developed two new tools that take the pain out of parsing and make file formats safer:
PolyFile: A polyglot-aware file identification utility with manually instrumented parsers that can semantically label the bytes of a file hierarchically; and
PolyTracker: An automated instrumentation framework that efficiently tracks input file taint through the execution of a program.
source: grugq
How a double-free bug in WhatsApp turns to RCE
https://awakened1712.github.io/hacking/hacking-whatsapp-gif-rce/ [awakened1712.github.io]
2019-10-02 20:09
tags:
android
c
exploit
format
malloc
security
In this blog post, I’m going to share about a double-free vulnerability that I discovered in WhatsApp for Android, and how I turned it into an RCE.
Double-free vulnerability in DDGifSlurp in decoding.c in libpl_droidsonroids_gif
source: HN
Position Independent Code (PIC) in shared libraries
https://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries/ [eli.thegreenplace.net]
2019-08-27 02:30
tags:
c
cpu
format
library
perf
programming
This article explained what position independent code is, and how it helps create shared libraries with shareable read-only text sections. There are some tradeoffs when choosing between PIC and its alternative (load-time relocation), and the eventual outcome really depends on a lot of factors, like the CPU architecture on which the program is going to run.
source: L
How to make compressed file quines, step by step
https://blog.matthewbarber.io//2019/07/22/how-to-make-compressed-file-quines.html [blog.matthewbarber.io]
2019-07-27 16:22
tags:
compression
format
programming
Much of the credit goes to folks much smarter than myself (they will be introduced); this tutorial is meant to curate previous work and literature as much as it is for myself to educate you. The goal here is to allow for any curious, technically-minded newcomer to make sense of all the concepts involved in creating compression quines.
source: L
How (not) to sign a JSON object
https://latacora.micro.blog/2019/07/24/how-not-to.html [latacora.micro.blog]
2019-07-24 17:19
tags:
auth
development
format
hash
programming
security
turtles
web
This covers a lot of ground. I liked this quote, even though there’s much more to the post.
Canonicalization is a quagnet, which is a term of art in vulnerability research meaning quagmire and vulnerability magnet. You can tell it’s bad just by how hard it is to type ‘canonicalization’.
source: HN