Kali Linux

Kekeo : A Little Toolbox To Play With Microsoft Kerberos In C

Kekeo is a little toolbox I have started to manipulate Microsoft Kerberos in C (and for fun)

ASN.1 library

In kekeo, I use an external commercial library to deal with Kerberos ASN.1 structures: OSS ASN.1/C (http://www.oss.com/asn1/products/asn1-c/asn1-c.html)
It was the only code generator/library that I’ve found to work easily with Microsoft C project.

  • works without a lots of dependencies;
  • magical documentation;
  • wonderful support for my stupid questions;
  • had a binary that work only few hours after started my project…

They were kind enough to offer me a 1-year licence.
With this one, I’m able to let you download binaries that run in your environment.
So don’t forget to thank them ( http://www.oss.com/company/contact-us.html / https://twitter.com/OSSNokalva )

Limitations

  • Binaries will work until December 21, 2017 (yeah, 1 year licence ;));
  • You must buy a licence from OSS ASN.1/C (or download a trial version) to build kekeo solution/adapt it.
    • http://www.oss.com/asn1/products/asn1-c/asn1-c.html
    • When you register for a free trial, don’t forget to refer me in the description field 😉 (kekeo or gentilkiwi)

Building kekeo with ASN.1/C

You can’t build kekeo out-of-the-box, you’have to generate C files and link with OSS libraries.

After downloading and installing a commercial/trial version of OSS ASN.1/CWin32 and/or x64:

  • Open a command prompt in ($kekeo)\modules\asn1
  • Adapt the ASN1C variable to your ASN.1/C configuration (architecture & version)

set ASN1C=”C:\Program Files\OSS Nokalva\ossasn1\winx64\10.4.0″

  • Depending on the targeted lib architecture:

Win32

%ASN1C%\bin\asn1.exe ^
%ASN1C%\asn1dflt\asn1dflt.ms.zp4 ^
KerberosV5Spec2.asn KerberosV5-PK-INIT-SPEC.asn PKIX1Explicit88.asn PKINIT.asn MS-SFU-KILE.asn ^
-noSampleCode -der -root -CStyleComments -externalName kekeo_asn1 -messageFormat msvc -verbose ^
-headerFile kull_m_kerberos_oss_asn1_internal.h -soedFile kull_m_kerberos_oss_asn1_internal_Win32.c

x64
%ASN1C%\bin\asn1.exe ^
%ASN1C%\asn1dflt\asn1dflt.msx64.zp8 ^
KerberosV5Spec2.asn KerberosV5-PK-INIT-SPEC.asn PKIX1Explicit88.asn PKINIT.asn MS-SFU-KILE.asn ^
-noSampleCode -der -root -CStyleComments -externalName kekeo_asn1 -messageFormat msvc -verbose ^
-headerFile kull_m_kerberos_oss_asn1_internal.h -soedFile kull_m_kerberos_oss_asn1_internal_x64.c

Header file kull_m_kerberos_oss_asn1_internal.h is the same for both architecture.

  • Copy from OSS ASN.1/C install dir (eg: C:\Program Files\OSS Nokalva\ossasn1\winx64\10.4.0)
    • include\ossasn1.h to ($kekeo)\inc
    • include\osstype.h to ($kekeo)\inc
    • lib\soeddefa.libto ($kekeo)\lib\{Win32 or x64}
    • lib\ossiphlp.libto ($kekeo)\lib\{Win32 or x64}

You can now build the kekeo solution in Visual Studio

R K

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago