Thanks for trying pmcma and posting the first message ever on this
mailing list.
First of : I agree we need to make an effort on documentation, figuring
out what pmcma is actually usefull for isn't too easy if you are not
able to read the whitepaper, which is very technical.
> * enabled executable stack
> * created a program thats full of bugs
> ** printf format string bug
> ** Buffer overrun on heap bumping into the VPTR of a simple class
You don't need an executable stack. You don't need to disable ASLR
either : pmcma was built to help exploitation under real conditions ;)
Now, heap overflows are definitly inside the capabilities of pmcma as it
is today (by overwritting function pointers in the heap).
> --> total : 1 validated function pointers
> (and found 0 additional control flow errors)
It would be usefull to have the full log of the analysis, which is
normaly saved under ./report-<pid>/analysis.txt for your reference.
From the small output you are showing us, pmcma manages to find a
function pointer actually used after you trigger the bug. Now, is it in
the heap section (which is a pre requisite so we can overwrite it using
the heap overwrite you are triggering) ? Impossible to answer without a
full report from pmcma :) It all depends if the given function pointer
found is in the heap section and if you can get to overwrite it using
the particular bug you are triggering.
> When I call pmcma with the -C option it complains:
>
> ./pmcma -C ./test AAAAAAAAAAAAAAAAAAAAAAAAAAA
> [!] Couldn't parse command line
>
> Adding "-d" will make it happy:
You just found a bug in pmcma. Please fill a bug report on github along
with full analysis.txt reports in both cases : that will help us narrow
down the bug and get it fixed faster.
Note that you can submit patches on github yourself : we already
accepted and merged several bug fixes !!
Thanks and regards,
Jonathan Brossard
> --
> You received this message because you are subscribed to the Google
> Groups "pmcma" group.
> To post to this group, send email to pm...@googlegroups.com.
> To unsubscribe from this group, send email to
> pmcma+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pmcma?hl=en.
>--[ Stopped at:
>cmp rax, 00000000FFFFF001h
>--[ Registers:
>rax=0xfffffffffffffdfc
The bug looks more like an invalid memory dereference in read mode, eax
pointing to unmapped memory. This type of bug is normally not exploitable.
That being said, pmcma also reports that the stack is likely to be
corrupted : if such is the case, you may have created a stack overflow
and the rest of the analysis will be biased (you can double check this
easily : did you compile the binary with stack cookies that would make
stack overflows direct exploitation fail because of stack cookies
overwrite ?).
>--[ Validating function pointers (relaxed mode):
>
> <*> Dereferenced function ptr at 0x00007fffffffe698 (full control flow
hijack)
> 0x00007fffffffe698 --> 0x000000000040092c // repeatability:101/100
>
> --> total : 1 validated function pointers
> (and found 0 additional control flow errors)
This means that at location 0x00007fffffffe698, you have a reliable
function pointer to overwrite. If you can overwrite it, then you can
hijack control flow of execution with a probability of 100% (pretty
common with disabled ASLR ;). Since you made the whole address space
executable, you'd like to modify your trigger to have this pointer
overwritten with a pointer to your own shellcode : that would grant you
a reliable exploit under the conditions you are testing.
Thanks and regards,
Jonathan Brossard