kkirsche / CVE-2017-10271

Oracle WebLogic WLS-WSAT Remote Code Execution Exploit (CVE-2017-10271)
Apache License 2.0
126 stars 42 forks source link

metasploit poc #3

Closed syrius01 closed 6 years ago

syrius01 commented 6 years ago

Hi,

Thanks for sharing this awesome PoC. There is something weird that I wanted to point out about the metasploit PoC;

def cmd_base if target['Platform'] == 'win' return 'cmd' else return '/bin/sh' end end

def cmd_opt if target['Platform'] == 'win' return '/c' else return '-c' end end

both are pointing to a win platform, shouldn't there be one of those two platform pointing to 'unix' ?

Thanks.

kkirsche commented 6 years ago

Hey!

Thanks for reaching out. In this case this would not be necessary, because we only support two targets:

So when we use the if / else shown, we can compare with target win to see if it's the default target. If it's not, we don't need to validate that it's Unix, as the only remaining target is unix, thus we can use a bare else block to identify this.