Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
pyMalleableC2 — مفسر بايثون لملفات تعريف C2 القابلة للتشكيل من Cobalt Strike. يتيح لك تحليلها وبنائها وتعديلها برمجياً. | Kitploit
أدوات/GitHubGitHub/byt3bl33d3r/pymalleablec2
القيادة والسيطرةالأدوات والمكوناتالفريق الأحمرتطوير الحمولات
GitHubbyt3bl33d3r/pymalleablec2

pyMalleableC2

مفسر بايثون لملفات تعريف C2 القابلة للتشكيل من Cobalt Strike. يتيح لك تحليلها وبنائها وتعديلها برمجياً.

عرض المستودع
2893547منذ 3 أشهرتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

pyMalleableC2

pyMalleableC2

مُفسِّر بايثون لملفات تكوين Malleable C2 الخاصة بـ Cobalt Strike، يسمح لك بتحليلها وتعديلها وبنائها برمجيًا والتحقق من صحة تركيبها.

يدعم جميع قواعد ملفات تكوين Malleable C2 اعتبارًا من إصدار Cobalt Strike 4.3.

إنه غير متوافق مع الإصدارات السابقة لـ Cobalt Strike.

ما الفروق بين pyMalleableC2 والمشاريع الأخرى المشابهة؟

  1. يقوم بتحليل ملفات التكوين باستخدام Lark وباستخدام ترميز eBNF. هذه الطريقة أكثر متانة من الاعتماد على التعبيرات النمطية (regexes) المحددة من قبل المستخدم أو محركات القوالب أو طرق مماثلة.
  2. يحوّل ملفات التكوين إلى شجرة تركيب مجردة (AST) يمكن إعادة بنائها إلى كود مصدري.
  3. بفضل ما سبق، يتيح لك pyMalleableC2 بناء ملفات التكوين برمجيًا أو تعديلها أثناء التنفيذ.
  4. يسمح بالتحقق من صحة تركيب ملفات تكوين Malleable C2 (لا يقوم بفحوصات وقت التشغيل — انظر التحذير أدناه).
  5. يحتوي على ذكاء اصطناعي يتجسد في الكثير من جمل if.

فهرس المحتويات

  • pyMalleableC2
    • التثبيت
    • 🚨 تحذير! لا توجد فحوصات وقت التشغيل (حتى الآن!) 🚨
    • المؤلف
    • قناة ديسكورد الرسمية
    • أمثلة
    • أسئلة شائعة

التثبيت

تم بناء pyMalleableC2 باستخدام بايثون 3.9، لكن من المفترض أن يكون متوافقًا مع الإصدارات السابقة وصولًا إلى بايثون 3.6.

التثبيت باستخدام Pip:

  • pip3 install pymalleablec2

🚨 تحذير 🚨

يتعامل pyMalleableC2 معك على أنك بالغ مسؤول ويفترض أنك تعرف كيفية كتابة ملفات تكوين Malleable C2. إنه قادر على اكتشاف أخطاء التركيب، لكن لا توجد فحوصات وقت تشغيل مطبقة. سيقوم عن طيب خاطر بإنشاء ملفات تكوين لا تعمل فعليًا في بيئة الإنتاج إذا طُلب منه ذلك. احرص دائمًا على اختبار ملفات التكوين المُنشأة باستخدام c2lint قبل استخدامها في الإنتاج!

(من الناحية الفنية، يمكنك بناء نسخة بايثون من c2lint باستخدام هذه المكتبة، *سعلة* PRs مرحب بها *سعلة*)

المؤلف

المؤلف الرئيسي لـ pyMalleableC2 هو Marcello Salvati

تويتر: @byt3bl33d3r، جيثب: @byt3bl33d3r

أمثلة

(انظر مجلد الأمثلة لمزيد من الأمثلة)

إنشاء AST لملف تكوين Malleable C2 موجود في ملف، ثم إعادة بناء الكود المصدري من AST:

root@kitploit:~
from malleablec2 import Profile

# Parse a profile given its path
p = Profile.from_file("amazon.profile")

# Print the generated AST
print(p.ast.pretty())

# Reconstruct source code from the AST and print to console
print(p.reconstruct())

# Shortcut for the above :)
print(p)

إنشاء AST لملف تكوين Malleable C2 'مضمّن' ثم إعادة بناء الكود المصدري من AST:

root@kitploit:~
code = '''
set jitter "0";
set sleeptime "3000";

http-get {
    set uri "/wow/this/is/cool";
}

http-post {
    set uri "/pymalleablec2/is/the/shit";
}
'''

# Parse a profile from a string
p = Profile.from_string(code)

# Print the generated AST
print(p.ast.pretty())

# Reconstruct source code from the AST and print to console
print(p)

بناء ملف تكوين Malleable C2 برمجيًا من الصفر:

root@kitploit:~
from malleablec2 import Profile
from malleablec2.components import *

# Create an empty profile
p = Profile.from_scratch()

# Set some global options
p.set_option("sleeptime", "0")
p.set_option("jitter", "0")
p.set_option("pipename", "mojo__##")

# Create an http-get block
http_get = HttpGetBlock()
# Set the uri http-get option
http_get.set_option("uri", "/wat/a/tease")

# Create a client block
client = ClientBlock()
# Add a header statement to the client block
client.add_statement("header", "Accept", "*/*")

# Create a server block
server = ServerBlock()

# Add the client and server blocks to the http-get block
http_get.add_code_block(client)
http_get.add_code_block(server)

# Create a http-post block
http_post = HttpPostBlock()
# Set the uri http-post option
http_post.set_option("uri", "/wat/ucraycray")

# Add the http-get and http-post blocks to the profile
p.add_code_block(http_get)
p.add_code_block(http_post)

# Reconstruct source code from the generated AST and print to console
print(p)

مثال بسيط جدًا يوضح كيفية عشوائية ملف تكوين Malleable C2 برمجيًا:

root@kitploit:~
from malleablec2 import Profile
from malleablec2.randomizer import ProfileRandomizer
from lark import Token

class MyRandomizer(ProfileRandomizer):

    # We implement the global_option_set method which will get called on every parsed global option statement in the profile
    def global_option_set(self, tree):
        option_name = tree.children[0]

        if option_name == "pipename":
            # "Randomize" the pipename value
            tree.children[1].children[0] = Token('ESCAPED_STRING', '"my_random_pipename_##"')

# Parse a profile given its path
p = Profile.from_file("amazon.profile")

r = MyRandomizer()

# Walk through the generated profile AST and apply randomization rules
r.randomize(p)

# Reconstruct source code then output the profile to the console
print(p)
تنزيل الأداة