<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q" -->

---
title: SAR — CVE-2019–12454 in sar2html and a Writable Cron...
description: A walkthrough of the SAR machine on OffSec Proving Grounds Play, demonstrating a two-step compromise chain. Initial access is gained via CVE-2019-12454, an...
canonical: https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: SAR — CVE-2019–12454 in sar2html and a Writable Cron Script That Got Me Root | OffSec PG | daily.dev
og:description: A walkthrough of the SAR machine on OffSec Proving Grounds Play, demonstrating a two-step compromise chain. Initial access is gained via CVE-2019-12454, an...
og:url: https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q
og:image: https://api.daily.dev/og/posts/OplMr4T3q.png
og:image:alt: SAR — CVE-2019–12454 in sar2html and a Writable Cron Script That Got Me Root | OffSec PG
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SAR — CVE-2019–12454 in sar2html and a Writable Cron Script That Got Me Root | OffSec PG

**[InfoSec Write-ups](https://daily.dev/sources/infosecwriteups)** · 13 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of the SAR machine on OffSec Proving Grounds Play, demonstrating a two-step compromise chain. Initial access is gained via CVE-2019-12454, an unauthenticated OS command injection in sar2html v3.2.1 through the unsanitized `plot` GET parameter, yielding a shell as www-data. Privilege escalation exploits a root-owned cron job that executes a script inside a web-writable directory — deleting and replacing the script with a reverse shell payload delivers a root shell within five minutes. The writeup also checks Baron Samedit, Dirty Sock, PwnKit, and Dirty Pipe as alternative escalation paths, noting that Ubuntu backported patches for some without changing version strings. Mitigation guidance covers input sanitization, cron job hardening, removing phpinfo.php, system updates, and egress filtering.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://infosecwriteups.com/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-0b4f8a17ca82>

## Similar posts on daily.dev

- [How We Could Have Backdoored Bash \(Hacktron blog\)](https://daily.dev/posts/how-we-could-have-backdoored-bash-hacktron-blog--dxbwcbkcu) · LWN.net · 0 upvotes · 0 comments
- [I Found Root Access on Critical Financial Infrastructure Using a Two-Day-Old Kernel Exploit](https://daily.dev/posts/i-found-root-access-on-critical-financial-infrastructure-using-a-two-day-old-kernel-exploit-ymu1rmoi7) · InfoSec Write-ups · 0 upvotes · 0 comments
- [PHP2Shell: the 72-hour response playbook \(CVE-2026–109618/109619\)](https://daily.dev/posts/php2shell-the-72-hour-response-playbook-cve-2026-109618-109619--0mtqu0uc9) · Medium · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security)

[View this post on daily.dev](https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"SAR — CVE-2019–12454 in sar2html and a Writable Cron Script That Got Me Root | OffSec PG","url":"https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q"},"datePublished":"2026-03-31T08:29:08.214Z","dateModified":"2026-03-31T08:29:39.096Z","description":"A walkthrough of the SAR machine on OffSec Proving Grounds Play, demonstrating a two-step compromise chain. Initial access is gained via CVE-2019-12454, an...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/70d2d90a085304fd59c0fcf285691872?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/70d2d90a085304fd59c0fcf285691872?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoSec Write-ups","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoSec Write-ups","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f0dc21b5bbfd46fda36f7b4b53dd1705","url":"https://daily.dev/sources/infosecwriteups"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/sar-cve-2019-12454-in-sar2html-and-a-writable-cron-script-that-got-me-root-offsec-pg-oplmr4t3q","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoSec Write-ups","item":"https://daily.dev/sources/infosecwriteups"},{"@type":"ListItem","position":3,"name":"SAR — CVE-2019–12454 in sar2html and a Writable Cron Script That Got Me Root | OffSec PG"}]}
```

