Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Classify types of exploits, based on trace results #8

Open
HarryR opened this issue Sep 27, 2016 · 1 comment
Open

Classify types of exploits, based on trace results #8

HarryR opened this issue Sep 27, 2016 · 1 comment

Comments

@HarryR
Copy link
Collaborator

HarryR commented Sep 27, 2016

With results of the traces we should be able to determine which category of bug it is. A classifier needs to match function calls and parameters, then output appropriate Tags. e.g.

  • str_replace = FilterStrReplace
  • mysql_real_escape = SqlEscape
  • stat/open = LocalFile
  • system = CmdExecution
  • connect/send = Network

This fits into the project because it will form the basis of the analyser and exploiter in the level above, e.g. 'LocalFile+CodeExecution' - RCE. The tags will be used to determine what modifications to make to the input parameters to verify the level of control over them, see if there's filtering etc.

@HarryR
Copy link
Collaborator Author

HarryR commented Oct 1, 2016

Interesting tricks for PHP (to be expanded):

  • Array parameters, e.g. id vs id[] - try variations of parameters, rather than just their values
  • str_replace, this can be evaded in many cases, can the evasion be automated? (e.g. str_replace("'", "'", $var...);
  • RE expression = PHP's equivalent to C's format string exploits.

Other interesting classifiers - what type is the value? From functions that the value passes through can we determine what it's expected to be? This could reduce the scope of a brute-force phuzz attack. - https://recalll.co/app/?q=smarty%20-%20un-exploitable%20php%20functions%20(whitelist)

Related links:

TODO: research hackerone, collect trends on PHP vulns to find a good starting point for writing classifiers.

High-level categories:

  • Evade/Avoid (bypass filtering, anti-exploitation methods, null bytes, unicode hax)
  • Reflect (exploit trust when passing info, e.g. XSS)
  • Local (machine that executes the code)
  • Remote (machine that code communicates with)
  • Control (over syscalls... code execution etc.)
  • Expose (e.g. LFD, errors, info leaks, reveal IP addresses)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant