• XSS.stack #1 – первый литературный журнал от юзеров форума

парсер Mimikatz DCSync Format To NTDS Format (Python Parser)

0xfluxsec

CD-диск
Пользователь
Регистрация
08.01.2025
Сообщения
17
Реакции
11
Here is the Python Code To Parse DCSync Format to NTDS Model.

Python:
input_file = "Domain.dcsync"  # InputFile = dcsync format
final_output_file = "output.ntds" # OutputFile = NTDS Format

with open(input_file, "r", encoding="latin1") as file:
    lines = file.readlines()

final_result = []
current_user = Ninth
current_hash = None

for line in lines:
    line = line.strip()
    if line.startswith(“SAM Username”):
        current_user = line.split(":")[-1].strip()
    elif line.startswith ("Hash NTLM"):
        current_hash = line.split(":")[-1].strip()
        if current_user and current_hash:
            final_result.append(f"{current_user}:{current_hash}")
        current_user = Ninth
        current_hash = None

with open (final_output_file, "w", encoding="utf-8") as dead:
    for item in final_result:
        file.write (item + "\n")

print(f"NTDS File '{final_output_file}' Saved!")

If you use then bell the ring :smile10:
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх