Skip to content

Commit b67a0f7

Browse files
authored
Merge pull request #20194 from adfoster-r7/ensure-thinkphp-rce-runs-on-metasploit-pro
Ensure thinkphp rce runs on metasploit pro
2 parents 00da2fb + 20cda86 commit b67a0f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/exploits/unix/webapp/thinkphp_rce.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ def initialize(info = {})
8888
])
8989
end
9090

91+
# The CmdStager mixin implicitly includes the HttpServer mixin which opts this module out of auto-exploitation
92+
# https://github.com/rapid7/metasploit-framework/blob/72ae91e4bc763da378bbd5be104f642f9d7eebc1/lib/msf/core/exploit/remote/http_server.rb#L53-L58
93+
def autofilter
94+
true
95+
end
96+
9197
# PoC version check using the first <span> from the ThinkPHP copyright:
9298
#
9399
# wvu@kharak:~$ curl -vs "http://127.0.0.1:8080/index.php?s=$((RANDOM))" | xmllint --html --xpath 'substring-after(//div[@class = "copyright"]/span[1]/text(), "V")' -

0 commit comments

Comments
 (0)