# NCSA-HTTPd `phf` command injection example This repo replicates finding [CVE-1999-0067] with [fuzzing](https://forallsecure.com/blog/fuzzing-for-command-injection). ## To build Assuming you just want to build the docker image, run: ```bash docker build -t forallsecure/ncsahttpd-cve-1999-0067 . ``` ## Get from Dockerhub If you don't want to build locally, you can pull a pre-built image directly from dockerhub: ```bash docker pull forallsecure/ncsahttpd-cve-1999-0067 ``` ## Run under Mayhem Change to the `ncsahttpd-cve-1999-0067` folder and run: ```bash mayhem run mayhem/phf ``` and watch Mayhem replicate CVE-1999-0067! It should take very little time (< 1 minute). ## Run locally If you want to just run the libfuzzer target locally and you've pulled the dockerhub image, run: ``` docker run forallsecure/ncsahttpd-cve-1999-0067 ``` ## POC We have included a proof of concept output under the `poc` directory. This bug should be found in around 30 seconds. Note: Fuzzing has some degree of non-determinism, so when you run yourself you may not get exactly this file. This is expected; your output should still trigger the phf bug.