403Webshell
Server IP : 119.195.102.159  /  Your IP : 216.73.217.134
Web Server : nginx/1.18.0
System : Linux picell 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64
User : altablue ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp/step3_4.py
import os, subprocess

target_roots = [
    "/home2/newspike",
    "/home2/knsign",
    "/home2/ulsanih",
    "/home2/corea-market",
    "/home2/rsc",
    "/home2/sklo2",
    "/home2/cfbt",
    "/home2/coexist",
    "/home2/gdm",
    "/home2/nanunbom",
    "/home2/pixelft"
]

print("=== 3단계: index.php / wp-config.php / .htaccess 무단 인젝션 점검 ===")

for r in target_roots:
    if not os.path.isdir(r):
        continue
    
    # 1. index.php check
    index_path = os.path.join(r, "index.php")
    if os.path.isfile(index_path):
        with open(index_path, 'r', errors='ignore') as f:
            lines = f.readlines()
            # Standard WP index.php is around 17-25 lines
            if len(lines) > 0 and ('eval(' in lines[0] or 'base64_decode' in lines[0] or 'include' in lines[0] and not 'wp-blog-header.php' in lines[0]):
                print(f"  [경고] {index_path} 상단 악성 인젝션 탐지됨! 1번 라인: {lines[0][:60]}...")
            else:
                print(f"  [정상] {index_path}")
                
    # 2. wp-config.php check
    wp_cfg = os.path.join(r, "wp-config.php")
    if os.path.isfile(wp_cfg):
        with open(wp_cfg, 'r', errors='ignore') as f:
            content = f.read(1024)
            if 'eval(' in content or 'gzuncompress' in content:
                print(f"  [경고] {wp_cfg} 악성 난독화 구문 탐지!")
            else:
                print(f"  [정상] {wp_cfg}")

print("\n=== 4단계: 디렉터리 및 파일 보안 권한 정비 (Dir 755, File 644) ===")
for r in target_roots:
    if not os.path.isdir(r):
        continue
    print(f"권한 설정 중: {r}")
    subprocess.run(f"find {r} -type d -exec chmod 755 {{}} +", shell=True)
    subprocess.run(f"find {r} -type f -exec chmod 644 {{}} +", shell=True)

print("=== 3단계 및 4단계 완료 ===")

Youez - 2016 - github.com/yon3zu
LinuXploit