zardus / preeny

Some helpful preload libraries for pwning stuff.
BSD 2-Clause "Simplified" License
1.56k stars 171 forks source link

GDB shows the program is still forking with defork.so #79

Closed docfate111 closed 3 years ago

docfate111 commented 3 years ago

This may not be an issue but gdb reports that the program is forking when using defork.so. Is this a bug in gdb or is the program still forking?

Gdb 9.2 on Ubuntu 20 LTS

gef➤  show environment LD_PRELOAD
LD_PRELOAD = /home/sam/tools/preeny/x86_64-linux-gnu/defork.so:/home/sam/tools/preeny/x86_64-linux-gnu/desock.so
gef➤  r -f conf -D < corpus_http1/4d3f725a325579bc2ef9ec096b1b9eee.00000526.honggfuzz.cov 
Starting program: /usr/local/sbin/lighttpd -f conf -D < corpus_http1/4d3f725a325579bc2ef9ec096b1b9eee.00000526.honggfuzz.cov
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffcabd5700 (LWP 144585)]
[New Thread 0x7fffca3d4700 (LWP 144586)]
[Thread 0x7fffcabd5700 (LWP 144585) exited]
2020-12-11 00:21:21: (server.c.1499) server started (lighttpd/1.4.56)
2020-12-11 00:21:21: (configfile.c.1124) WARNING: unknown config-key: compress.allowed-encodings (ignored)
2020-12-11 00:21:21: (configfile.c.1124) WARNING: unknown config-key: compress.filetype (ignored)
2020-12-11 00:21:21: (configfile.c.1124) WARNING: unknown config-key: compress.cache-dir (ignored)
2020-12-11 00:21:21: (configfile.c.1124) WARNING: unknown config-key: server.use-noatime (ignored)
2020-12-11 00:21:21: (configfile.c.1124) WARNING: unknown config-key: accesslog.filename (ignored)
[New Thread 0x7fffc9bd3700 (LWP 144587)]
[New Thread 0x7fffc93d2700 (LWP 144588)]
[Thread 0x7fffc9bd3700 (LWP 144587) exited]
HTTP/1.1 400 Bad Request
Content-Type: text/html
Content-Length: 345
Connection: close
Date: Fri, 11 Dec 2020 00:21:21 GMT
Server: lighttpd/1.4.56

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
 </body>
</html>
[Thread 0x7fffc93d2700 (LWP 144588) exited]
[Thread 0x7fffca3d4700 (LWP 144586) exited]
[Inferior 1 (process 144584) exited normally]
zardus commented 3 years ago

I don't see a fork in there anywhere, just threads...

docfate111 commented 3 years ago

Sorry when I searched the source of what I was fuzzing I did not see any code about threads but now that I look at it again there is a comment explaining that a library initializes threading.