Commit cba013d7 by Vlad Committed by GitHub

Add files via upload

Finds PHP content in files w/ image headers (JPG/GIF/PNG) via magic numbers.
parent ef45a0e4
/*
Finds PHP code in JP(E)Gs, GIFs, PNGs.
Magic numbers via Wikipedia.
*/
rule php_in_image
{
meta:
author = "Vlad https://github.com/vlad-s"
date = "2016/07/18"
description = "Finds image files w/ PHP code in images"
strings:
$gif = /^GIF8[79]a/
$jfif = { ff d8 ff ee 00 10 4a 46 49 }
$png = { 89 50 4e 47 0d 0a 1a 0a }
$php_tag = "<?php"
condition:
(($gif at 0) or
($jfif at 0) or
($png at 0)) and
$php_tag
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment