POC详情: e42a4846bde4b3dbecf049fdc6d2bd4c64d8afed

来源
关联漏洞
标题: Ruby on Rails 安全特征问题漏洞 (CVE-2019-5420)
描述:Ruby on Rails是Rails团队的一套基于Ruby语言的开源Web应用框架。 Ruby on Rails中存在安全特征问题漏洞。远程攻击者可利用该漏洞在受影响的系统上执行任意代码。
描述
 Exploit in Rails Development Mode. With some knowledge of a target application it is possible for an attacker to guess the automatically generated development mode secret token. This secret token can be used in combination with other Rails internals to escalate to a remote code execution exploit.
介绍
# CVE-2019-5420 PoC

A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically generated development mode secret token. This secret token can be used in combination with other Rails internals to escalate to a remote code execution exploit. This PoC code for CVE-2019-5420 escalates the privileges to admin account without the remote code execution itself.

# How to use

Copy the value of the cookie and replace it with "VALUE_OF_THE_COOKIE" at line 11:

`cookie = CGI.unescape "VALUE_OF_THE_COOKIE"  # put in the value of your cookie here`

Furthermore, replace "NAME::Application" with the name of your application. For example, if the applications name is "test", it would be "test::Application":

`secret = Digest::MD5.hexdigest("NAME::Application") # the name of the ruby on rails application, either bruteforce or have to be known directly`

Run the exploit and copy the output of the cookie. Replace it with the cookie of the web application:

`ruby CVE-2019-5420.rb`
文件快照

[4.0K] /data/pocs/e42a4846bde4b3dbecf049fdc6d2bd4c64d8afed ├── [1.2K] CVE-2019-5420.rb └── [1.0K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。