#zip library?
1 messages · Page 1 of 1 (latest)
There's one on github but not up to date: https://github.com/SuperAuguste/zarc
libzip would be a C library you could wrap afaik
Yeah, libzip shouldn't be too hard to use from zig
zarc is currently the only pure zig library for zips (but only supports reading), I'm in the process of rewriting it to do both reading and writing
it shouldn't be too far away from compiling with master
thanks! I will look at them 👍
https://github.com/foxnne/pixi/tree/main/src/deps/zip
If you'd like feel free to steal this as well, works for me on mac/win/linux.
if you only want to read, the zip format isn't hard. not designed to be secure tho so such a tool would be good. i believe such tools exist and pentesting types use them, probably in c. i wouldn't bet on libzip having all the tools necessary if that's what you want to do. i watched a video when i was learning the zip format on various exploits due to its format being underspecified etc. i don't know specifically about zip bombs. i think there are multiple kinds of zip bombs tho
libzip should probably have everythin you need, considering it's used in Chrome, Plex, and a boat load of other things
does it check for the directory both forwards and backwards? that's maybe the most obvious way it's been exploited. you can have two directories and different tools find different ones depending on whether they look forwards or backwards. there's a couple of other methods too. i'm no expert but whenever you play with file formats at a low level you see all kinds of possibilities. people that look for exploits are better at seeing these things than me. i'll quickly see if i can find the video...
Re-doing my talk from Technische Hochschule Ingolstadt
Slides/etc:
http://gynvael.coldwind.pl/?lang=en&id=682
http://gynvael.coldwind.pl/?id=523