Yaklang (CDSL-YAK)
website·Indexed 32 days ago
https://yaklang.io/docs/intro/A dynamically typed, Go-runtime-backed domain-specific programming language (CDSL-YAK) built for cybersecurity engineering. The project includes the Yaklang language, Yakit (latest release v1.4.9-0925), and YakLab tutorials, providing tools for security research workflows, AI agent engines, and built-in modules for xpath and jsonstream.
What's inside Yaklang
- Yaklang treats Large Language Models (LLMs) as first-class citizens. It allows developers to initiate conversations, perform function calls, consume structured data streams, process large text via pipelines, and run ReAct agents directly within security scripts.
Overview of the Yak Project ecosystem
The Yak Project provides a suite of tools for cybersecurity engineering, centered around a domain-specific language (CDSL-YAK) to unify security automation and vulnerability research.Overview of the Yak Project Ecosystem
The Yak Project provides a suite of tools for cybersecurity engineering:
- Yaklang (YAK): A domain-specific programming language (CDSL-YAK) designed to unify scanning, proof-of-concept development, vulnerability validation, traffic analysis, and security automation.
- Yakit: An open-source, cross-platform GUI cybersecurity workbench built on Yaklang, used for penetration testing and security collaboration. It supports Windows, macOS, and Linux.
- IRify: A source-code security analysis tool built on YAK SSA and SyntaxFlow, used for reproducible and extensible multi-language static analysis and vulnerability discovery.
Use Yaklang for cybersecurity engineering
Yaklang (CDSL-YAK) is a domain-specific programming language designed for cybersecurity engineering. It is used to unify scanning, proof-of-concept (PoC) authoring, vulnerability validation, traffic analysis, and security automation.Analyze ELF files with elf
Theelflibrary parses ELF (Executable and Linkable Format) files to read headers, sections, segments, architecture, and entry point information. Useelf.IsELFto determine if a file is an ELF binary.Create an HTTP server with the httpserver library
Thehttpserverlibrary allows developers to quickly start an HTTP service by registering a handler function. The handler provides access to the request (req) and response writer (rsp), which is useful for creating Mock APIs, callback services, or local debugging tools.Inspect object members using the desc function
Similar to Python'sdir()function, Yak provides thedescfunction to inspect the members and available fields of an unknown object during development and testing.Perform text similarity analysis with SSDeep, SimHash, and SQLMAP
Yak provides a unified interface for three text similarity algorithms to determine if pages are identical or similar, which is useful for generic vulnerability detection. SSDeep is recommended for processing massive amounts of text.Send raw HTTP packets for security testing
Yak provides a specialized method for sending raw HTTP packets optimized for security research, bypassing some of the standard Golanghttpmodule abstractions. The engine automatically handles the calculation ofContent-Lengthunless manually overridden.Use the xpath module for HTML processing
Thexpathbuilt-in module provides a streamlined wrapper aroundhtmlqueryfor processing HTML. Before using the query APIs, you must generate an operable HTML document usingxpath.LoadHTMLDocument.Implement modular programming in Yaklang
Yaklang supports multi-file programming and modularity. It provides specific global variables to help locate files and resource directories, includingYAKMAIN(a boolean that istrueonly when the file is the primary entry point andfalsewhen imported by another file).Install and access Yak Project source code
The Yak Project is open source and hosted on GitHub under the organization
github.com/yaklang. Key repositories include:yaklang: Contains the language and runtime.yakit: Contains the security workbench.
To install Yakit, use the installers provided on the official website Downloads page. To install the Yaklang runtime, follow the configuration instructions located in the
yaklangproject repository.