Skip to content

Instantly share code, notes, and snippets.

@Neko7sora
Last active June 23, 2024 04:32
Show Gist options
  • Save Neko7sora/ad1655acc6ef20f6027ec689e9ea6c8e to your computer and use it in GitHub Desktop.
Save Neko7sora/ad1655acc6ef20f6027ec689e9ea6c8e to your computer and use it in GitHub Desktop.
Cloudflare Firewall Rules

Cloudflare Firewall Rules

Patch

Security_patch.txt

  • 正規表現のRedosを防ぐ
  • 不具合回避
  • ルールをくぐり抜けるのを防ぐ

(完全に防げるとは言ってない)

OLD_VERSIONS.txt

Microsoft Internet Explorer --> MSIE, Trident

Microsoft Edge (EdgeHTML ver.) --> Edge

NCSA Mosaic --> NCSA_Mosaic

ガラパゴス携帯, 古いゲーム機についているブラウザ etc... --> Mozilla/1. Mozilla/2. Mozilla/3. Mozilla/4.

補足

ルールには含まれていないよ

Microsoft Edge (Chromium ver.) --> Edg

Apple

Apple_old_versions.txt

 < iOS 16, macOS 13

iOS 12 は、セキュリティアップデートで問題なく(完全にとは言ってない)つかえるが、ルールに含まれています。

macOS 11 は、セキュリティアップデートで問題なく(完全にとは言ってない)つかえるが、ルールに含まれています。

macOS 12 は、セキュリティアップデートで問題なく(完全にとは言ってない)つかえるが、ルールに含まれています。

https://support.apple.com/ja-jp/HT201222

Windows

Windows_old_versions.txt

 < windows10(11)

Windows NT系,Windows 9x系のバージョンがルールに含まれています。

存在しないバージョンがルールに含まれています。(ex. Windows 2,3.4.5...)

Windows_old_versions_wide.txt

MS-DOS系のバージョンがルールに含まれています。(ex. Win1,2,3)

存在しないバージョンがルールに含まれています。(ex. Win4,5,6,7,8,9)

補足

ログ解析したときにあったため...たぶんユーザーエージェント偽装だと思われる...

Android

Android_old_versions.txt

 < Android 12 12L 13 14 15

Androidオープンソースプロジェクト (AOSP) に対して、セキュリティ脆弱性(セキュリティホール)を修正するパッチが提供されていないバージョンをルールに含まれています。

補足

Android 10 は、2023年2月がパッチ提供が最後のためルールに含まれています。 https://source.android.com/docs/security/bulletin/2023-03-01?hl=en

Android 11 は、2024年2月がパッチ提供が最後のためルールに含まれています。 https://source.android.com/docs/security/bulletin/2024-03-01?hl=en


ブラウザ

Firefox_old_versions.txt

Mozilla Firefox

 < 126

https://www.mozilla.org/en-US/firefox/releases/

Chrome_old_versions.txt

Google Chrome

Microsoft Edge や The Browser Company Arc も検知できます。 edge://version arc://version

image

 < 126

https://chromestatus.com/roadmap


(http.user_agent contains "Android 1.") or (http.user_agent contains "Android 2.") or (http.user_agent contains "Android 3.") or (http.user_agent contains "Android 4.") or (http.user_agent contains "Android 5.") or (http.user_agent contains "Android 6.") or (http.user_agent contains "Android 7.") or (http.user_agent contains "Android 8.") or (http.user_agent contains "Android 9.") or (http.user_agent contains "Android 10.") or (http.user_agent contains "Android 11.")
(http.user_agent contains "iPhone OS 15") or (http.user_agent contains "iPhone OS 14") or (http.user_agent contains "iPhone OS 13") or (http.user_agent contains "iPhone OS 12") or (http.user_agent contains "iPhone OS 11") or (http.user_agent contains "iPhone OS 10") or (http.user_agent contains "iPhone OS 9") or (http.user_agent contains "iPhone OS 8") or (http.user_agent contains "iPhone OS 7") or (http.user_agent contains "iPhone OS 6") or (http.user_agent contains "iPhone OS 5") or (http.user_agent contains "iPhone; U; CPU iPhone OS") or (http.user_agent contains "iPad OS 15") or (http.user_agent contains "iPad OS 14") or (http.user_agent contains "iPad OS 13") or (http.user_agent contains "iPad OS 12") or (http.user_agent contains "iPad OS 11") or (http.user_agent contains "iPad OS 10") or (http.user_agent contains "iPad OS 9") or (http.user_agent contains "iPad OS 8") or (http.user_agent contains "iPad OS 7") or (http.user_agent contains "iPad OS 6") or (http.user_agent contains "iPad OS 5") or (http.user_agent contains "iPad; U; CPU OS ") or (http.user_agent contains "iPod; U; CPU") or (http.user_agent contains "Mac OS X 10.") or (http.user_agent contains "Mac OS X 10_") or (http.user_agent contains "Mac OS X 11.") or (http.user_agent contains "Mac OS X 11_") or (http.user_agent contains "Mac OS X 12.") or (http.user_agent contains "Mac OS X 12_")
(http.user_agent contains "Chrome/1.") or (http.user_agent contains "Chrome/2.") or (http.user_agent contains "Chrome/3.") or (http.user_agent contains "Chrome/4.") or (http.user_agent contains "Chrome/5.") or (http.user_agent contains "Chrome/6.") or (http.user_agent contains "Chrome/7.") or (http.user_agent contains "Chrome/8.") or (http.user_agent contains "Chrome/9.") or (http.user_agent contains "Chrome/10.") or (http.user_agent contains "Chrome/11.") or (http.user_agent contains "Chrome/12.") or (http.user_agent contains "Chrome/13.") or (http.user_agent contains "Chrome/14.") or (http.user_agent contains "Chrome/15.") or (http.user_agent contains "Chrome/16.") or (http.user_agent contains "Chrome/17.") or (http.user_agent contains "Chrome/18.") or (http.user_agent contains "Chrome/19.") or (http.user_agent contains "Chrome/20.") or (http.user_agent contains "Chrome/21.") or (http.user_agent contains "Chrome/22.") or (http.user_agent contains "Chrome/23.") or (http.user_agent contains "Chrome/24.") or (http.user_agent contains "Chrome/25.") or (http.user_agent contains "Chrome/26.") or (http.user_agent contains "Chrome/27.") or (http.user_agent contains "Chrome/28.") or (http.user_agent contains "Chrome/29.") or (http.user_agent contains "Chrome/30.") or (http.user_agent contains "Chrome/31.") or (http.user_agent contains "Chrome/32.") or (http.user_agent contains "Chrome/33.") or (http.user_agent contains "Chrome/34.") or (http.user_agent contains "Chrome/35.") or (http.user_agent contains "Chrome/36.") or (http.user_agent contains "Chrome/37.") or (http.user_agent contains "Chrome/38.") or (http.user_agent contains "Chrome/39.") or (http.user_agent contains "Chrome/40.") or (http.user_agent contains "Chrome/41.") or (http.user_agent contains "Chrome/42.") or (http.user_agent contains "Chrome/43.") or (http.user_agent contains "Chrome/44.") or (http.user_agent contains "Chrome/45.") or (http.user_agent contains "Chrome/46.") or (http.user_agent contains "Chrome/47.") or (http.user_agent contains "Chrome/48.") or (http.user_agent contains "Chrome/49.") or (http.user_agent contains "Chrome/50.") or (http.user_agent contains "Chrome/51.") or (http.user_agent contains "Chrome/52.") or (http.user_agent contains "Chrome/53.") or (http.user_agent contains "Chrome/54.") or (http.user_agent contains "Chrome/55.") or (http.user_agent contains "Chrome/56.") or (http.user_agent contains "Chrome/57.") or (http.user_agent contains "Chrome/58.") or (http.user_agent contains "Chrome/59.") or (http.user_agent contains "Chrome/60.") or (http.user_agent contains "Chrome/61.") or (http.user_agent contains "Chrome/62.") or (http.user_agent contains "Chrome/63.") or (http.user_agent contains "Chrome/64.") or (http.user_agent contains "Chrome/65.") or (http.user_agent contains "Chrome/66.") or (http.user_agent contains "Chrome/67.") or (http.user_agent contains "Chrome/68.") or (http.user_agent contains "Chrome/69.") or (http.user_agent contains "Chrome/70.") or (http.user_agent contains "Chrome/71.") or (http.user_agent contains "Chrome/72.") or (http.user_agent contains "Chrome/73.") or (http.user_agent contains "Chrome/74.") or (http.user_agent contains "Chrome/75.") or (http.user_agent contains "Chrome/76.") or (http.user_agent contains "Chrome/77.") or (http.user_agent contains "Chrome/78.") or (http.user_agent contains "Chrome/79.") or (http.user_agent contains "Chrome/80.") or (http.user_agent contains "Chrome/81.") or (http.user_agent contains "Chrome/82.") or (http.user_agent contains "Chrome/83.") or (http.user_agent contains "Chrome/84.") or (http.user_agent contains "Chrome/85.") or (http.user_agent contains "Chrome/86.") or (http.user_agent contains "Chrome/87.") or (http.user_agent contains "Chrome/88.") or (http.user_agent contains "Chrome/89.") or (http.user_agent contains "Chrome/90.") or (http.user_agent contains "Chrome/91.") or (http.user_agent contains "Chrome/92.") or (http.user_agent contains "Chrome/93.") or (http.user_agent contains "Chrome/94.") or (http.user_agent contains "Chrome/95.") or (http.user_agent contains "Chrome/96.") or (http.user_agent contains "Chrome/97.") or (http.user_agent contains "Chrome/98.") or (http.user_agent contains "Chrome/99.") or (http.user_agent contains "Chrome/100.") or (http.user_agent contains "Chrome/101.") or (http.user_agent contains "Chrome/102.") or (http.user_agent contains "Chrome/103.") or (http.user_agent contains "Chrome/104.") or (http.user_agent contains "Chrome/105.") or (http.user_agent contains "Chrome/106.") or (http.user_agent contains "Chrome/107.") or (http.user_agent contains "Chrome/108.") or (http.user_agent contains "Chrome/109.") or (http.user_agent contains "Chrome/110.") or (http.user_agent contains "Chrome/111.") or (http.user_agent contains "Chrome/112.") or (http.user_agent contains "Chrome/113.") or (http.user_agent contains "Chrome/114.") or (http.user_agent contains "Chrome/115.") or (http.user_agent contains "Chrome/116.") or (http.user_agent contains "Chrome/117.") or (http.user_agent contains "Chrome/118.") or (http.user_agent contains "Chrome/119.") or (http.user_agent contains "Chrome/120.") or (http.user_agent contains "Chrome/121.") or (http.user_agent contains "Chrome/122.") or (http.user_agent contains "Chrome/123.") or (http.user_agent contains "Chrome/124.") or (http.user_agent contains "Chrome/125.")
(http.user_agent contains "Firefox/1.") or (http.user_agent contains "Firefox/2.") or (http.user_agent contains "Firefox/3.") or (http.user_agent contains "Firefox/4.") or (http.user_agent contains "Firefox/5.") or (http.user_agent contains "Firefox/6.") or (http.user_agent contains "Firefox/7.") or (http.user_agent contains "Firefox/8.") or (http.user_agent contains "Firefox/9.") or (http.user_agent contains "Firefox/10.") or (http.user_agent contains "Firefox/11.") or (http.user_agent contains "Firefox/12.") or (http.user_agent contains "Firefox/13.") or (http.user_agent contains "Firefox/14.") or (http.user_agent contains "Firefox/15.") or (http.user_agent contains "Firefox/16.") or (http.user_agent contains "Firefox/17.") or (http.user_agent contains "Firefox/18.") or (http.user_agent contains "Firefox/19.") or (http.user_agent contains "Firefox/20.") or (http.user_agent contains "Firefox/21.") or (http.user_agent contains "Firefox/22.") or (http.user_agent contains "Firefox/23.") or (http.user_agent contains "Firefox/24.") or (http.user_agent contains "Firefox/25.") or (http.user_agent contains "Firefox/26.") or (http.user_agent contains "Firefox/27.") or (http.user_agent contains "Firefox/28.") or (http.user_agent contains "Firefox/29.") or (http.user_agent contains "Firefox/30.") or (http.user_agent contains "Firefox/31.") or (http.user_agent contains "Firefox/32.") or (http.user_agent contains "Firefox/33.") or (http.user_agent contains "Firefox/34.") or (http.user_agent contains "Firefox/35.") or (http.user_agent contains "Firefox/36.") or (http.user_agent contains "Firefox/37.") or (http.user_agent contains "Firefox/38.") or (http.user_agent contains "Firefox/39.") or (http.user_agent contains "Firefox/40.") or (http.user_agent contains "Firefox/41.") or (http.user_agent contains "Firefox/42.") or (http.user_agent contains "Firefox/43.") or (http.user_agent contains "Firefox/44.") or (http.user_agent contains "Firefox/45.") or (http.user_agent contains "Firefox/46.") or (http.user_agent contains "Firefox/47.") or (http.user_agent contains "Firefox/48.") or (http.user_agent contains "Firefox/49.") or (http.user_agent contains "Firefox/50.") or (http.user_agent contains "Firefox/51.") or (http.user_agent contains "Firefox/52.") or (http.user_agent contains "Firefox/53.") or (http.user_agent contains "Firefox/54.") or (http.user_agent contains "Firefox/55.") or (http.user_agent contains "Firefox/56.") or (http.user_agent contains "Firefox/57.") or (http.user_agent contains "Firefox/58.") or (http.user_agent contains "Firefox/59.") or (http.user_agent contains "Firefox/60.") or (http.user_agent contains "Firefox/61.") or (http.user_agent contains "Firefox/62.") or (http.user_agent contains "Firefox/63.") or (http.user_agent contains "Firefox/64.") or (http.user_agent contains "Firefox/65.") or (http.user_agent contains "Firefox/66.") or (http.user_agent contains "Firefox/67.") or (http.user_agent contains "Firefox/68.") or (http.user_agent contains "Firefox/69.") or (http.user_agent contains "Firefox/70.") or (http.user_agent contains "Firefox/71.") or (http.user_agent contains "Firefox/72.") or (http.user_agent contains "Firefox/73.") or (http.user_agent contains "Firefox/74.") or (http.user_agent contains "Firefox/75.") or (http.user_agent contains "Firefox/76.") or (http.user_agent contains "Firefox/77.") or (http.user_agent contains "Firefox/78.") or (http.user_agent contains "Firefox/79.") or (http.user_agent contains "Firefox/80.") or (http.user_agent contains "Firefox/81.") or (http.user_agent contains "Firefox/82.") or (http.user_agent contains "Firefox/83.") or (http.user_agent contains "Firefox/84.") or (http.user_agent contains "Firefox/85.") or (http.user_agent contains "Firefox/86.") or (http.user_agent contains "Firefox/87.") or (http.user_agent contains "Firefox/88.") or (http.user_agent contains "Firefox/89.") or (http.user_agent contains "Firefox/90.") or (http.user_agent contains "Firefox/91.") or (http.user_agent contains "Firefox/92.") or (http.user_agent contains "Firefox/93.") or (http.user_agent contains "Firefox/94.") or (http.user_agent contains "Firefox/95.") or (http.user_agent contains "Firefox/96.") or (http.user_agent contains "Firefox/97.") or (http.user_agent contains "Firefox/98.") or (http.user_agent contains "Firefox/99.") or (http.user_agent contains "Firefox/100.") or (http.user_agent contains "Firefox/101.") or (http.user_agent contains "Firefox/102.") or (http.user_agent contains "Firefox/103.") or (http.user_agent contains "Firefox/104.") or (http.user_agent contains "Firefox/105.") or (http.user_agent contains "Firefox/106.") or (http.user_agent contains "Firefox/107.") or (http.user_agent contains "Firefox/108.") or (http.user_agent contains "Firefox/109.") or (http.user_agent contains "Firefox/110.") or (http.user_agent contains "Firefox/111.") or (http.user_agent contains "Firefox/112.") or (http.user_agent contains "Firefox/113.") or (http.user_agent contains "Firefox/114.") or (http.user_agent contains "Firefox/115.") or (http.user_agent contains "Firefox/116.") or (http.user_agent contains "Firefox/117.") or (http.user_agent contains "Firefox/118.") or (http.user_agent contains "Firefox/119.") or (http.user_agent contains "Firefox/120.") or (http.user_agent contains "Firefox/121.") or (http.user_agent contains "Firefox/122.") or (http.user_agent contains "Firefox/123.") or (http.user_agent contains "Firefox/124.") or (http.user_agent contains "Firefox/125.")
(http.user_agent contains "MSIE") or (http.user_agent contains "Trident") or (http.user_agent contains "Edge") or (http.user_agent contains "NCSA_Mosaic") or (http.user_agent contains "Mozilla/4.") or (http.user_agent contains "Mozilla/3.") or (http.user_agent contains "Mozilla/2.") or (http.user_agent contains "Mozilla/1.")
(http.user_agent contains "\\") or (http.user_agent contains "&") or (http.user_agent contains "$") or (http.user_agent contains "#") or (http.user_agent contains "..") or (http.user_agent contains "?") or (http.user_agent contains "||")
(http.user_agent contains "Windows ME") or (http.user_agent contains "Windows 95") or (http.user_agent contains "Windows 98") or (http.user_agent contains "Windows NT 0.") or (http.user_agent contains "Windows NT 1.") or (http.user_agent contains "Windows NT 2.") or (http.user_agent contains "Windows NT 3.") or (http.user_agent contains "Windows NT 4.") or (http.user_agent contains "Windows NT 5.") or (http.user_agent contains "Windows NT 6.") or (http.user_agent contains "Windows NT 7.") or (http.user_agent contains "Windows NT 8.") or (http.user_agent contains "Windows NT 9.")
(http.user_agent contains "Windows 1.") or (http.user_agent contains "Win1.") or (http.user_agent contains "Windows 2.") or (http.user_agent contains "Win2.") or (http.user_agent contains "Windows 3.") or (http.user_agent contains "Win3.") or (http.user_agent contains "Windows 4.") or (http.user_agent contains "Win4.") or (http.user_agent contains "Windows 5.") or (http.user_agent contains "Win5.") or (http.user_agent contains "Windows 6.") or (http.user_agent contains "Win6.") or (http.user_agent contains "Windows 7.") or (http.user_agent contains "Win7.") or (http.user_agent contains "Windows 8.") or (http.user_agent contains "Win8.") or (http.user_agent contains "Windows 9.") or (http.user_agent contains "Win9.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment