diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b66ae78 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto eol=lf +*.sh text eol=lf +*.conf text eol=lf +*.php text eol=lf +*.py text eol=lf +*.md text eol=lf diff --git a/.gitignore b/.gitignore index c1a8b96..d676557 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ research/upstream/ research/captures/*.resp research/captures/*.bin research/libphp.so +research/control/ diff --git a/poc/__init__.py b/poc/__init__.py new file mode 100644 index 0000000..6db105a --- /dev/null +++ b/poc/__init__.py @@ -0,0 +1,3 @@ +__author__ = "Hermes Agent" +__org__ = "independent security research" +__version__ = "0.1.0" diff --git a/poc/elf.py b/poc/elf.py new file mode 100644 index 0000000..41aee63 --- /dev/null +++ b/poc/elf.py @@ -0,0 +1,44 @@ +import struct + +SHT_SYMTAB = 2 +SHT_DYNSYM = 11 + + +def _sections(buf): + if buf[:4] != b"\x7fELF" or buf[4] != 2: + raise ValueError("not an ELF64 file") + e_shoff, = struct.unpack_from("