Exploit database

GH-e76a3d3d0be61d55e6620c59c6a75b15

cumakurt/php2shell-scan

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-109618

412 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files3
cumakurt/php2shell-scanRevision 7f4ea41c2e62

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

internal/waf/control_test.go

Go · 1,903 bytes
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 Cuma KURT <[email protected]>
//
// php2shell-scan is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version. It is distributed WITHOUT ANY WARRANTY; see the LICENSE file
// for the full text.

package waf

import (
	"testing"

	"php2shell-scan/internal/model"
)

func TestControlDistinguishesApplicationRejection(t *testing.T) {
	// The application rejects everything with 403; the control path is
	// rejected the same way, so the WAF must not be blamed.
	probe := &ProbeResult{
		Performed:      true,
		Blocked:        false,
		Status:         403,
		ControlStatus:  403,
		ControlChecked: true,
		Note:           "benign marker request returned HTTP 403, but the non-existent control path returned HTTP 403 too, so the rejection is not attributable to a WAF",
	}
	res := Analyze(response(map[string]string{"Server": "nginx"}, "hello"), probe)

	if res.Status == model.WAFDetected {
		t.Fatalf("a shared 403 must not be attributed to a WAF: %+v", res)
	}
	if len(res.Evidence) == 0 {
		t.Error("the control explanation should be recorded as evidence")
	}
}

func TestControlConfirmsWAFWhenOnlyMarkerIsBlocked(t *testing.T) {
	probe := &ProbeResult{
		Performed:      true,
		Blocked:        true,
		Status:         403,
		ControlStatus:  404,
		ControlChecked: true,
		Note:           "benign marker request was rejected with HTTP 403",
	}
	res := Analyze(response(map[string]string{"Server": "nginx"}, "hello"), probe)

	if res.Status != model.WAFAmbiguous {
		t.Fatalf("expected ambiguous without a vendor signature, got %s", res.Status)
	}
	if res.Confidence != model.ConfidenceLow {
		t.Errorf("expected low confidence, got %s", res.Confidence)
	}
}