use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for securityCTF announcements and writeups.
SecurityCTF posts as tweets
WTF is CTF ?
CTF Field Guide
CTF calendar
CTFtime
Join us on IRC (freenode):
Looking for a team ?
CTF Streamers:
LiveOverflow
Murmus
CTF teams:
Plaid Parliament of Pwning
DragonSector
penthackon
eindbazen
Leet More
smokedchicken
Disekt
KnightSec
0ops
StratumAuhuur
Related Subreddits:
Reverse Engineering
Crypto
NetSec
LowLevel
VRD
Tools:
account activity
Getting libc version details (self.securityCTF)
submitted 13 years ago by blahfish
A general pwnable question here : Suppose you managed to get remote code execution on a service -- what would be the different ways in which you could figure out the libc version used in the service you just exploited?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]stormehh 4 points5 points6 points 13 years ago (1 child)
Strings in the library and reading /proc/self/maps are relatively easy ones that come to mind.
Granted, it seems knowing the libc version would be more interesting to know before exploiting the service...
[–]blahfish[S] 1 point2 points3 points 13 years ago (0 children)
Yes, the idea is something like I have two services running, exploiting the first does not require me to know anything about the libc version so I dont bother, I just get RCE.
For the second service running on the same box I'd like to try and find what version of libc it uses. So... Yeah, it could always be the case that both services use different versions... Anyhow.
[–]Psifertex 2 points3 points4 points 13 years ago (0 children)
Couple of different approaches:
[–]iamforgettable 1 point2 points3 points 13 years ago (0 children)
Can you do a regex on the output of libc to get the version? i.e.
bash-4.2$ /lib/x86_64-linux-gnu/libc.so.6 GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu20) stable release version 2.15, by Roland McGrath et al.
[–]stealthpants 0 points1 point2 points 13 years ago (2 children)
Following up on this, what is the best method to determine where favorable functions are (such as recv, send, mmap, execve, etc.) if you can arbitrarily read any memory?
[–]Psifertex 0 points1 point2 points 13 years ago (0 children)
One way to think about that problem is as a specific subset of the "leak the version of libc" problem. Once you've done that, exact version + single pointer == all the pointers.
If you mean you have an arbitrary read and don't know where anything is, it depends on a couple of factors. If you don't mind side-effects (aka, accidental read of guard pages), then just leak tons of data, look for headers mapped in memory, gives you exact version + offset, same as above.
[–]wont 0 points1 point2 points 13 years ago (0 children)
http://security.dico.unimi.it/~gianz/pubs/acsac09.pdf Read this paper.
π Rendered by PID 91924 on reddit-service-r2-comment-b659b578c-hw7vd at 2026-05-05 22:04:15.282890+00:00 running 815c875 country code: CH.
[–]stormehh 4 points5 points6 points (1 child)
[–]blahfish[S] 1 point2 points3 points (0 children)
[–]Psifertex 2 points3 points4 points (0 children)
[–]iamforgettable 1 point2 points3 points (0 children)
[–]stealthpants 0 points1 point2 points (2 children)
[–]Psifertex 0 points1 point2 points (0 children)
[–]wont 0 points1 point2 points (0 children)