Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How to hide your Webshell gracefully

Shulou Source: shulou.com Published: 2022-05-31 20:35:27 10月03日 Update

This article shows you how to hide your Webshell gracefully. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Make a kill-free webshell

The most important thing to hide webshell is to avoid killing, you can put webshell in the library file or in the picture horse, there are too many places to put, as long as the killing tool can not find, your webshell can survive for a long time, after all, the administrator does not have so much energy to check each code.

The method of command execution

Here we use our most commonly used php sentence horse to demonstrate. PHP version is 5.6. before writing a sentence horse, let's analyze the method of executing commands in PHP.

1. Direct execution

Use the php function to run the command directly, the common functions are (eval, system, assert), etc., you can directly call the command execution.

@ eval ('echo this is the output;')

2. Dynamic function execution

We first pass a function name to a variable as a string, and then execute it as a function.

$a = "phpinfo"; $a ()

3. The file contains the execution

There are two php files. We put the execution of the command in file b and use file a to include it to achieve the effect of execution.

B.php

Tags: Functions files methods variables directories one sentence commands characters code strings parameters that is Trojans websites scripts output dynamics names pictures Malaysia Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux MySQL Apple Docker