2018-01-04:
Python 3 BrokenPipeError woes (debugging notes)
Yesterday I've spent a fair amount of time trying to do a simple thing: in Python 3 write logs to a FIFO (created with mkfifo(1)) in a somewhat reliable way (i.e. without loosing logs on the writer end when the reader disconnects, nor duplicating them). It turned out to be quite an unforeseen adventure with what seems to be 3 levels of buffering on the way.
The exact scenario:
1. Both reader and writer connect to a FIFO.
2. Reader disconnects for some reason.
3. Writer writes N bytes of data and flushes it (and in the process gets a BrokenPipeError as expected).
4. Reader re-connects.
5. Writer does a flush (or disconnects, which implicitly invokes flush).
6. Reader reads data from the pipe (if any).
The main question here is:
How many bytes (sent in the 3rd step) did the reader receive in the end?
Read more...
[
0 comments ]
|
2017-10-16:
Wyniki Security PWNing Code Golf 2017
Zdecydowaną zaletą konkursów typu code golf / sizecoding jest łatwość testowania i oceny prac, dzięki czemu wyniki mogę ogłosić od razu po zakończeniu konkursu. Tak więc, nie przedłużając, chciałbym pogratulować następującym osobom (każda z nich otrzyma po wejściówce na konferencję Security PWNing 2017):
1. Marcin Probola (169 bajtów, zgłoszone 13.10.2017 23:17)
2. Robert Sebastian Gerus (169 bajtów, zgłoszone 14.10.2017 1:15)
Konkurs był niesamowicie zacięty - przyszły aż 22 rozwiązania z przedziału 170-179 bajtów, a w sumie zgłoszone zostały 84 potencjalne rozwiązania (w tym kilka nieprawidłowych).
Listę zgłoszeń można zobaczyć tutaj, a same zgłoszenia tutaj.
Chciałbym podziękować wszystkim za udział - good game, well played :)
P.S. Jako, że jest to blog również o hackingu, to nie sposób nie wspomnieć o bardzo kreatywnych metodach na nagięcie zasad.
Czytaj dalej...
[
5 komentarzy ]
|
Five newest or recently updated notes (these are unfinished posts, code snippets, links or commands I find useful but always forget, and other notes that just don't fit on the blog):
Click here for a list of all notes.
 Security papers and research notes
Some conference slides are linked at the bottom of this page.
 Selected vulnerabilities
- A few Microsoft Windows privilege escalations and some DoSes patched by MS10-021 and MS10-011 - this research was presented on HITB Dubai 2010 and CONFidence 2010 (video available here).
- Well, actually a few more bugs in Windows kernel and drivers discovered during our Bochspwn research (see this post and this one) using our kfetch-toolkit.
They were patched in
MS13-016,
MS13-017,
MS13-031 and
MS13-036.
- Adobe Reader 9.5.1 and 10.1.3 multiple vulnerabilities - 62 unique crashes, from that 31 trivially exploitable and 9 more potentially exploitable, 11 CVE's assigned (CVE-2012-4149 to CVE-2012-4160). Some of these bugs were fixed for Windows and OSX releases of Adobe Reader in APSB12-16.
- Adobe Flash had also quite a lot of fixes (around 60 CVEs assigned). Some details can be found in these bulletins (in random order):
APSB12-27,
APSB12-24,
APSB12-22,
APSB13-17,
APSB13-14,
APSB13-11,
APSB13-09,
APSB13-05 and
APSB13-01.
- Contributed to discovery of multiple low-to-high vulnerabilities in Google Chrome (CVE-2012-2851, CVE-2012-2855, CVE-2012-2856, CVE-2012-2862, CVE-2012-2863 and some other) - some of these were mentioned in this post.
- A lot of bugs in ffmpeg and libav which resulted in 892 (sic!) patches in ffmpeg and 299 patches in libav (CVE-2011-3930 to CVE-2011-3952 and some other).
- Cygwin cygwin1.dll shared section local privilege escalation (demo video) - discovered while revisiting old-school classes of bugs (see paper above).
- Two minor bugs in PuTTY and aterm and rxvt found while playing with terminal control codes. Put here to create some illusion of diversity.
- Mozilla Firefox 2.0.0.11 and Opera 9.50 information leak, also midly affected Safair, Konqueror and some other products (CVE-2007-6524, CVE-2008-0420, CVE-2008-0894, CVE-2008-1573). A demo video is also available.
- A small but funny bug in Total Commander 7.01 - an FTP client gets attacked by the server, leading to a path traversal.
- And there were also these two: a local privilege escalation that required a USB stick of death, and a funny compiler bug.
The full list of vulnerabilities discovered by me (including collaborative work) can be found here (please note that the list might be out of date).
The Google Application Security / Research site might also contain some of my findings.
 Coding (selected posts)
 Tools and libraries
- PiXieServ is a simplified PXE (network boot) server for Windows and Linux-based OS, created for testing of very small home-made OS. See also the post about it.
- ExcpHook, a system-wide exception monitor for Windows XP 32-bit. Useful if you're fuzzing something that doesn't like having a debugger attached.
- Ent is an entropy measuring tool for reverse engineering reconnaissance (see also a post explaining how to use it).
- HiperDrop is a simple command line process memory dumper for Windows, with a few different work modes.
- asmloader - this little app executes headerless machine code (compiled assembly code). It's meant to be an aid in learning/teaching and playing with assembly, as well as the right tool when you just need to execute some machine code.
- NetSock is a simple socket/networking lib/wrapper for C++ I've wrote back in 2003 and update from time to time - I use it for most of my network-enabled projects.
|
 Edukacyjnie (wybrane posty)
Dla programistów:
Security / hacking:
- Hacking - jak uczyć się security/hackingu i spać spokojnie.
Dodatkowo, kilka przemyśleń na temat odnajdywania się na rynku pracy w IT:
 Programowanie (wybrane posty)
← trochę więcej postów jest po angielskojęzycznej stronie.
 Gamedev i GFX (wybrane posty)
Grafika generowana proceduralnie:
|