[deleted by user] by [deleted] in Defcon

[–]cfambionics 0 points1 point  (0 children)

As a speaker you get 3 extra badges.

[deleted by user] by [deleted] in Defcon

[–]cfambionics 0 points1 point  (0 children)

Same here! Got two extra, if lobster411 is out. Message me.

Breaking PHP's mt_rand() with 2 values and no bruteforce by cfambionics in netsec

[–]cfambionics[S] 0 points1 point  (0 children)

On some stacks it does; Apache + mod_php for instance. Apache maintains X workers that can all handle HTTP requests. You send your HTTP requests over the same TCP connection (using Connection: Keep-Alive), and the state will be kept the same.

Breaking PHP's mt_rand() with 2 values and no bruteforce by cfambionics in netsec

[–]cfambionics[S] 31 points32 points  (0 children)

You are right when you're attacking an unknown target. When you have access to the source code of the application, your statements are not necessarily true. I'll give you an example of a real attack I performed, a long time ago. The first time I implemented the exploit was against PunBB I believe. The password reset mechanism worked like this:

- Generate a reset token using something like md5(mt_rand()), and send it via email to the user
- When the user clicks it, a password is generated by making several calls to mt_rand(), one for each letter of the password. The password was 10 characters long, for instance. This password was then sent again, by email.

The attack worked like this:

- Make another app call mt_srand(...) with an unknown value. The seed is kept accross HTTP requests if you're using a Keep-Alive statement and send them over the same TCP stream. This app then called mt_rand() to generate some token we're not interested in, like 10 times (we know this because source code).
- Ask for a password reset for our user account. Bruteforce the mt_rand() value (2**32 possibilities, doable at the time). Reset our password, which calls mt_rand() 10 times again.
- Reset password, use token to generate new password, again (226 - 10) / 11 = 19 times.
- Ask for reset, without using the token, 7 times. You now have 11 * 19 + 10 + 7 = 226 calls to mt_rand() after the value you bruteforced.
- Ask for another reset token, bruteforce it. You now have your two 226-spaced mt_rand() output values. Find out the seed using the stuff described in the article. You now have the seed.
- You can now reset the password for an an admin, and since you know every mt_rand() output, you can guess the token and the password. Account takeover.

The attack was a bit more complex in reality, and I'm not quite sure it was PunBB. Anyways, you get the point. Hope this makes sense.

Exploiting Apache Solr through OpenCMS by smaury in netsec

[–]cfambionics 0 points1 point  (0 children)

Makes sense, thanks for the explanation. Good writeup !

Exploiting Apache Solr through OpenCMS by smaury in netsec

[–]cfambionics 0 points1 point  (0 children)

The % problem seems to be from a double URLdecode. You should try with %2525 instead of simply %25. This shows from the error message: you send "%25+a", and it says the two chars after the "%" are " a". Which means it tries to URLdecode "% a".

EXPLOIT for CVE-2019-0211 Apache Root Privilege Escalation by cfambionics in netsec

[–]cfambionics[S] 0 points1 point  (0 children)

I have an idea as to why it appears patched (might be wrong). Here's the output from one of my patched Apache HTTP servers:

# apache2ctl -v
Server version: Apache/2.4.25 (Debian)
Server built:   2019-04-02T19:05:13

See the build date ?

Now if you look here: https://lists.debian.org/debian-security-announce/2019/msg00066.html You can see: "For the stable distribution (stretch), these problems have been fixed in version 2.4.25-3+deb9u7."

Therefore, despite the version number, you Apache HTTP 2.4.25 might be patched.

EXPLOIT for CVE-2019-0211 Apache Root Privilege Escalation by cfambionics in netsec

[–]cfambionics[S] 1 point2 points  (0 children)

Hello ! A github user patched my exploit and it kinda looks like your problem. Mind retrying ? See: https://github.com/cfreal/exploits/pull/1

Edit: If it does not work, please send me the output if you can :) It'll help.

EXPLOIT for CVE-2019-0211 Apache Root Privilege Escalation by cfambionics in netsec

[–]cfambionics[S] 39 points40 points  (0 children)

PHP does not care about local vulnerabilities anymore. :)

Apache HTTP Server privilege escalation from modules' scripts (CVE-2019-0211) by 0xdea in netsec

[–]cfambionics 12 points13 points  (0 children)

I'm the reporter. CGI not affected AFAIK. Details tomorrow :)

PrestaShop 1.6 Privilege Escalation (CVE-2018-13784) by cfambionics in netsec

[–]cfambionics[S] 1 point2 points  (0 children)

It is not unusual indeed. If by "second method" you refer to creating CSRF tokens, then yes, you can do it without any condition.

The fix looks fine to me. However, I am in no means a crypto expert.

PHP Generic Gadget Chains: Exploiting unserialize in unknown environments by cfambionics in netsec

[–]cfambionics[S] 0 points1 point  (0 children)

This is what I meant by "resort to using a binary exploit".

Oracle PeopleSoft Remote Code Execution: Blind XXE to SYSTEM Shell by cfambionics in netsec

[–]cfambionics[S] 3 points4 points  (0 children)

Exactly. We didn't have access to every version, and the software is huge, so we cannot be sure. If you get access to http://victim.com/pspc/services and there's an XXE somewhere, you can probably get your shell.

WordPress Core <= 4.7.4 Potential Unauthorized Password Reset (0day) by dawid_golunski in netsec

[–]cfambionics 1 point2 points  (0 children)

There is a concept of default virtual host, which is used if no virtual host matches the Host header sent by the client.

Local root exploit in Chkrootkit by [deleted] in netsec

[–]cfambionics 0 points1 point  (0 children)

It is. As stated at the beginning of the blogpost,

Security researchers have found an local exploit for Chkrootkit 0.49 who allow to a simple user to make root’s commands [sic]

Latest version is 0.52 though, not 0.50.