Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
WPTimeCapsulePOC — An authentication bypass was recently discovered (https://www.webarxsecurity.com/vulnerability-infinitewp-client-wp-time-capsule/) on WP Time Capsule < 1.21.16. This PoC proves how the issue works and how it can be exploited. | Kitploit
工具/GitHubGitHub/secforce/wptimecapsulepoc
ExploitationWeb Application ExploitationPost-ExploitationPenetration TestingAuthenticationPayload Development
GitHubsecforce/wptimecapsulepoc

WPTimeCapsulePOC

An authentication bypass was recently discovered (https://www.webarxsecurity.com/vulnerability-infinitewp-client-wp-time-capsule/) on WP Time Capsule < 1.21.16. This PoC proves how the issue works and how it can be exploited.

查看仓库
546年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Backup and Staging by WP Time Capsule < 1.21.16 - 身份认证绕过概念验证

最近在 WP Time Capsule < 1.21.16 中发现了一个身份认证绕过漏洞(https://www.webarxsecurity.com/vulnerability-infinitewp-client-wp-time-capsule/)。此 PoC 演示了该问题的工作原理以及如何利用它。

该 PoC

该 PoC 提供两种不同的选项:

  • 选项 1:获取管理员 cookie 示例:
    root@kitploit:~
    poc.py http://127.0.0.1/
    
  • 选项 2:获取管理员 cookie,并在 /wp-content/plugins/shell/shell.php 上传一个受密码保护的 webshell 示例:
    root@kitploit:~
    poc.py http://127.0.0.1 shell
    

问题所在

函数 decode_server_request_wptc() 位于 wptc-cron-functions.php 中,由 Wptc_Init 构造函数调用,它在解码请求体发送的请求时不执行任何权限检查:

root@kitploit:~
if( !empty($HTTP_RAW_POST_DATA_LOCAL)
  && strpos($HTTP_RAW_POST_DATA_LOCAL, 'IWP_JSON_PREFIX') !== false ){

  wptc_log('', "--------IWP_JSON_PREFIX--coming------");

  wp_cookie_constants();
  wptc_login_as_admin();
}

它仅检查任何 POST 请求的请求体是否包含字符串 IWP_JSON_PREFIX,如果包含,则调用以下方法:

root@kitploit:~
  wp_cookie_constants();
  wptc_login_as_admin();

wptc_login_as_admin() 获取所有管理员用户,取出第一个,并为该用户名生成一个 cookie。

root@kitploit:~
function wptc_login_as_admin(){

	wptc_log(func_get_args(), "--------" . __FUNCTION__ . "--------");

	wptc_define_admin_constants();

	if( !function_exists('is_user_logged_in') ){
		include_once( ABSPATH . 'wp-includes/pluggable.php' );
	}

	if(is_user_logged_in()){
		return ;
	}

	$admins = get_users(array('role' => 'administrator'));

	foreach ($admins as $admin) {
		$user = $admin;
		break;
	}

	if (isset($user) && isset($user->ID)) {
		wp_set_current_user($user->ID);
		// Compatibility with All In One Security
		update_user_meta($user->ID, 'last_login_time', current_time('mysql'));
	}

	if(!defined('SECURE_AUTH_COOKIE')){

		return;
	}

	$isHTTPS = (bool)is_ssl();

	if($isHTTPS){
		wp_set_auth_cookie($user->ID);
	} else{
		wp_set_auth_cookie($user->ID, false, false);
		wp_set_auth_cookie($user->ID, false, true);
	}
}

复现问题

本次测试我们使用了:

  • 一个支持 docker-compose 的 WordPress 镜像 https://github.com/nezhar/wordpress-docker-compose
  • wp-time-capsule 1.21.15 https://downloads.wordpress.org/plugin/wp-time-capsule.1.21.15.zip
  • Burp Suite

涉及的步骤如下:

  1. 在浏览器中打开一个新会话
  2. 转到 wp-login.php
  3. 输入任意(虚拟的)用户名和密码
  4. 将 BODY 的任意部分替换为以下字符串:IWP_JSON_PREFIX
  5. 返回首页

下载工具