Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
cve-2023-50164 — Apache Struts2의 CVE-2023-50164 탐지 스크립트로, 파일 시스템과 아카이브에서 취약한 버전을 스캔하는 PowerShell 및 Bash 도구를 제공합니다. | Kitploit
도구/GitHubGitHub/helsecert/cve-2023-50164
Vulnerability AnalysisCode AnalysisExploitationInformation GatheringWeb SecurityPenetration Testing
GitHubhelsecert/cve-2023-50164

cve-2023-50164

Apache Struts2의 CVE-2023-50164 탐지 스크립트로, 파일 시스템과 아카이브에서 취약한 버전을 스캔하는 PowerShell 및 Bash 도구를 제공합니다.

저장소 보기
12년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2023-50164

취약한 버전

  • Struts 2.0.0 - Struts 2.3.37 (EOL)
  • Struts 2.5.0 - Struts 2.5.32
  • Struts 6.0.0 - Struts 6.3.0

취약점이 해결된 버전

  • Struts 2.5.33
  • Struts 6.3.0.2

검색 스크립트

Windows/PowerShell

PowerShell 5.1 이상용. 작성자: Kjetil Sigvartsen (Norsk helsenett SF).

root@kitploit:~
[String[]]$Extensions = @('*.jar', '*.war', '*.ear')
[string]$searchString = 'struts2-core'

foreach ($Disk in (Get-CimInstance Win32_LogicalDisk)) {

    [string]$DriveLetter = $Disk.DeviceID
    [string]$Path        = "$($driveLetter)\"

    foreach ($ChildItem in (Get-ChildItem -Path $Path -Recurse -Include $Extensions -File -ErrorAction SilentlyContinue)) {
        [String]$FilePath = $ChildItem.FullName
        $Content  = Get-Content -Path $filePath -Raw
        if ($Content -like "*$searchString*") {
            Write-Output $filePath
        } #if
    } #foreach

} #foreach

Windows/PowerShell 멀티스레드

PowerShell 5.1 이상용. 작성자: Kjetil Sigvartsen (Norsk helsenett SF). 이 스크립트는 CPU를 더 많이 사용할 수 있지만 위의 버전보다 상당히 빠릅니다. C:\Windows는 속도상의 이유로 필터링되었습니다. 더 자세한 출력을 원하면 스크립트 상단에 다음을 추가하세요:

root@kitploit:~
$VerbosePreference = 'Continue'

코드는 다음과 같습니다:

root@kitploit:~
[String[]]$Extensions = @('*.jar', '*.war', '*.ear')
[string]$searchString = 'struts2-core'
[string[]]$Exceptions = @('C:\Windows')

foreach ($Disk in (Get-CimInstance Win32_LogicalDisk)) {

    [string]$DriveLetter = $Disk.DeviceID
    [string]$Path        = "$($driveLetter)\"

    Write-Verbose -Message "Working on $Path"

    try {
        [System.IO.DirectoryInfo[]]$Folders = Get-ChildItem -Path $Path -Directory -ErrorAction Stop
    } #try
    catch {
        Write-Verbose -Message "Unable to get child folders in disk $Path"
        continue
    } #catch

    [System.Management.Automation.Job[]]$Jobs = $Null
    [System.Management.Automation.Job[]]$Jobs = foreach ($Folder in $Folders) {
        [string]$JobName = $Path + $Folder.Name

        if ($Exceptions -contains $JobName) {
            Write-Verbose -Message "Skipping $JobName, in exception list"
            continue
        } #if

        Write-Verbose -Message "Starting jobs for $JobName"

        Start-Job -Name $JobName -ScriptBlock {
            Return (Get-ChildItem -Path $Using:JobName -Recurse -Include $Using:Extensions -File -ErrorAction SilentlyContinue)
        } #Start-Job
    } #Foreach


    [System.Object[]]$JobResults = $Null
    [System.Object[]]$JobResults = Receive-Job -Job $Jobs -AutoRemoveJob -Wait -ErrorAction Stop

    [System.Management.Automation.Job[]]$RemainingJobs = $Null
    [System.Management.Automation.Job[]]$RemainingJobs = get-Job -Name "$Path*" -ErrorAction Stop

    if ($RemainingJobs) {
        Write-Verbose -Message "$($RemainingJobs.count) jobs remaining"
    } #if


    foreach ($ChildItem in $JobResults) {
        [String]$FilePath = $ChildItem.FullName
        [string]$Content  = Get-Content -Path $filePath -Raw
        if ($Content -like "*$searchString*" -or $FilePath -like "*$searchString*") {
            Write-Output $filePath
        } #if
    } #foreach

} #foreach

Linux/Bash

root@kitploit:~
sudo find / -type f \( -iname "*.jar" -o -iname "*.war" -o -iname "*.ear" \) -exec grep -Fl "struts2-core" {} 2>/dev/null \;

결과 해석

스크립트는 struts2 코어 라이브러리이거나 이를 포함하는 파일을 나열합니다. 몇 가지 예:

/sti/til/mappe/struts2-core-6.3.0.2.jar - struts2 코어 라이브러리가 파일 시스템에 직접 있으며, 버전은 6.3.0.2로 취약점이 해결되었습니다.

/sti/til/mappe/apps/struts2-showcase-6.3.0.2.war - struts2 코어 라이브러리가 .war 파일 내부에 있으며, 포함된 Struts2 버전을 확인하려면 내용을 나열해야 합니다:

Linux/Bash

root@kitploit:~
$ unzip -l /sti/til/mappe/apps/struts2-showcase-6.3.0.2.war | fgrep struts2-core
  1519992  2023-12-05 05:58   WEB-INF/lib/struts2-core-6.3.0.2.jar

Windows/PowerShell:

PowerShell 5.1 이상용. 작성자: Kjetil Sigvartsen (Norsk helsenett SF).

root@kitploit:~
[string[]]$ZipFiles = @(
	'C:\sti\til\mappe\apps\struts2-showcase-6.3.0.2.war'
)

Add-Type -AssemblyName System.IO.Compression.FileSystem

foreach ($ZipFile in $ZipFiles) {
	foreach ($Entry in ([System.IO.Compression.ZipFile]::OpenRead($zipFile).Entries)) {
		if ($Entry.FullName -like "*struts2-core*") {
			Write-Output $Entry.FullName
		} #if
	} #foreach
} #foreach
도구 다운로드