yon11b

[SK 쉴더스 루키즈] 리눅스/윈도우 서버에서 자동 진단 수행하기 본문

보안/SK 쉴더스 루키즈

[SK 쉴더스 루키즈] 리눅스/윈도우 서버에서 자동 진단 수행하기

yon11b 2026. 5. 9. 01:59
반응형

주요정보통신기반시설 취약점 분석 가이드

KISA 발행

 

리눅스 진단

 

U-46 패스워드 최소 길이 설정

2021 주요정보통신기반시설 기술적 취약점 분석·평가 방법 상세가이드

 

패스워드 최소 길이를 8자로 설정한다.

 

이제 테스트해보자.

 

처음: test

나중: test1234

test를 입력했을 때는 더 긴 pw를 입력하라면서 반려한다.

 

 

U-01 원격 루트 로그인 금지

 

 

리눅스 진단 자동화

https://github.com/catember/vulnerability-check

 

GitHub - catember/vulnerability-check: 주요정보통신기반시설 기술적 취약점 분석 평가 방법 상세가이드

주요정보통신기반시설 기술적 취약점 분석 평가 방법 상세가이드 기반 취약점 점검 스크립트. Contribute to catember/vulnerability-check development by creating an account on GitHub.

github.com

 

 

자동화 진단 결과

 

어떻게 진단하나 코드 하나만 보자.

 

 

윈도우 진단

환경: Virtual Box

 

패스워드 최소 길이 설정

게스트 허용 차단

게스트는 pw 없이 들어올 수 있기 때문에 차단해준다.

 

 

 

 

윈도우 진단 자동화

https://github.com/gasbugs/Win-KICS-Checker

 

GitHub - gasbugs/Win-KICS-Checker: 🇰🇷 주요정보통신기반시설 Windows 서버 취약점 진단을 위한 파워셸(P

🇰🇷 주요정보통신기반시설 Windows 서버 취약점 진단을 위한 파워셸(PowerShell) 기반 자동화 스크립트입니다. - gasbugs/Win-KICS-Checker

github.com

 

한 개씩 실행

# W-01: Administrator Account Name Check

$result = [PSCustomObject]@{
    "CheckItem" = "W-01"
    "Category" = "Account Management"
    "Result" = ""
    "Details" = ""
    "Timestamp" = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
}

try {
    # Get the local user with the well-known SID for the administrator account (ends with -500)
    $adminUser = Get-LocalUser | Where-Object { $_.SID.Value.EndsWith('-500') }

    if ($adminUser) {
        $adminName = $adminUser.Name
        if ($adminName -eq "Administrator") {
            $result.Result = "Vulnerable"
            $result.Details = "The default administrator account name has not been changed."
        } else {
            $result.Result = "Good"
            $result.Details = "The default administrator account name has been changed to '$adminName'."
        }
    } else {
        $result.Result = "Error"
        $result.Details = "Could not find the built-in administrator account (SID ending in -500)."
    }
} catch {
    $result.Result = "Error"
    $result.Details = "An error occurred while checking the Administrator account information. $_"
}

$result | ConvertTo-Json -Compress

 

 

여러 개 한 번에 실행

# 실행 정책을 변경
Set-ExecutionPolicy RemoteSigned -Scope Process

# 파워쉘 실행
$pw = Read-Host -Prompt 'password'
./run_all_diag_remote.ps1 -ComputerName 127.0.0.1 -Port 5986 -Username vagrant -Password $pw
Remove-Variable pw

 

 

 

 

 

728x90