Merge pull request #9812 from projectdiscovery/pussycat0x-patch-6

Create checkpoint-firewall-enum.yaml
patch-2
Ritik Chaddha 2024-05-15 11:51:40 +05:30 committed by GitHub
commit 3d3113da6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
id: checkpoint-firewall-enum
info:
name: Check Point Firewall - Detect
author: pussycat0x
severity: info
reference:
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/gather/checkpoint_hostname.rb
metadata:
verfied: true
shodan-query: product:"Check Point Firewall"
tags: js,network,firewall,checkpoint,enum
javascript:
- code: |
let packet = bytes.NewBuffer();
let prob = "\x51\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x0bsecuremote\x00"
data = packet.Write(prob)
const c = require("nuclei/net");
let conn = c.Open('tcp', `${Host}:${Port}`);
conn.Send(data);
let resp = conn.RecvFullString();
let regex = /CN=(.+),O=(.+?)\./i;
let match = resp.match(regex);
let fw_hostname = match[1];
let sc_hostname = match[2];
let result = (`Firewall Host: ${fw_hostname}, SmartCenter Host: ${sc_hostname}`);
result
args:
Host: "{{Host}}"
Port: 264
extractors:
- type: dsl
dsl:
- response