Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
pyMalleableC2 — Cobalt Strike Malleable C2 프로필을 위한 Python 인터프리터입니다. 이를 프로그래밍 방식으로 구문 분석, 빌드 및 수정할 수 있습니다. | Kitploit
도구/GitHubGitHub/byt3bl33d3r/pymalleablec2
Command and ControlUtilities & FrameworksRed TeamingPayload Development
GitHubbyt3bl33d3r/pymalleablec2

pyMalleableC2

Cobalt Strike Malleable C2 프로필을 위한 Python 인터프리터입니다. 이를 프로그래밍 방식으로 구문 분석, 빌드 및 수정할 수 있습니다.

저장소 보기
289352개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

pyMalleableC2

pyMalleableC2

Cobalt Strike Malleable C2 프로필을 파싱, 수정, 프로그래매틱하게 빌드하고 구문을 검증할 수 있는 Python 인터프리터입니다.

Cobalt Strike 버전 4.3부터 모든 Malleable C2 프로필 문법을 지원합니다.

이전 Cobalt Strike 릴리스와 호환되지 않습니다.

pyMalleableC2와 다른 유사 프로젝트의 차이점은 무엇인가요?

  1. Lark를 사용하여 eBNF 표기법으로 프로필을 파싱합니다. 이 접근 방식은 사용자 정의 정규식, 템플릿 엔진 등보다 훨씬 강력합니다.
  2. 프로필을 추상 구문 트리(AST)로 변환한 후 다시 소스 코드로 재구성할 수 있습니다.
  3. 위의 이유로 pyMalleableC2를 사용하면 프로그래매틱하게 프로필을 빌드하거나 즉석에서 수정할 수 있습니다.
  4. Malleable C2 프로필의 구문을 검증할 수 있습니다 (런타임 검사는 수행하지 않습니다. 아래 경고 참조).
  5. 많은 if 문의 형태로 AI를 갖추고 있습니다.

목차

  • pyMalleableC2
    • 설치
    • 🚨 경고! 런타임 검사 없음 (아직!) 🚨
    • 저자
    • 공식 Discord 채널
    • 예제
    • 자주 묻는 질문

설치

pyMalleableC2는 Python 3.9로 빌드되었지만 Python 3.6까지 하위 호환되어야 합니다.

Pip으로 설치:

  • pip3 install pymalleablec2

🚨 경고 🚨

pyMalleableC2는 사용자를 동의하는 성인으로 대우하며 Malleable C2 프로필 작성법을 알고 있다고 가정합니다. 구문 오류는 감지할 수 있지만 런타임 검사는 구현되지 않았습니다. 지시하면 실제로 프로덕션에서 작동하지 않는 프로필도 기꺼이 생성합니다. 프로덕션에서 사용하기 전에 항상 생성된 프로필을 c2lint로 실행하세요!

(기술적으로 이 라이브러리를 사용하여 c2lint의 Python 버전을 빌드할 수 있습니다. **기침* PR 환영합니다 **기침*)

저자

pyMalleableC2의 주요 저자는 Marcello Salvati입니다.

트위터: @byt3bl33d3r, GitHub: @byt3bl33d3r

예제

(자세한 내용은 예제 폴더 참조)

파일에 있는 Malleable C2 프로필의 AST를 생성한 다음 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)

'인라인' Malleable C2 프로필의 AST를 생성한 다음 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)
도구 다운로드