Ready - HackTheBox Writeup (10.10.10.220)

Posted on Wed, May 19, 2021 Medium Linux Web Application GitLab Docker
Medium-difficulty Linux box on exploiting CVE-2018-19571 (SSRF), CVE-2018-19585 (CRLF) vulnerabilities in GitLab 11.4.7 CE. Privilege escalation by abusing the notify_on_release feature in cgroups to escape the privileged Docker container.

Recon

Enumeration

Exploitation

Privilege Escalation

Persistence

Resources

  1. https://liveoverflow.com/gitlab-11-4-7-remote-code-execution-real-world-ctf-2018/
  2. https://www.youtube.com/watch?v=LrLJuyAdoAg
  3. https://github.com/dotPY-hax/gitlab_RCE/blob/main/gitlab_rce.py
  4. https://medium.com/better-programming/escaping-docker-privileged-containers-a7ae7d17f5a1
  5. https://book.hacktricks.xyz/linux-unix/privilege-escalation/escaping-from-a-docker-container#sys_admin-capability-and-apparmor-disabled
  6. https://ajxchapman.github.io/containers/2020/11/19/privileged-container-escape.html