InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

Using Discord as a C2

grepStrength
InfoSec Write-ups
Published in
7 min readJan 9, 2025

Setting Up the Infrastructure

Creating the Server

Creating the Bot

I later renamed this to “Command&Control”…
sadfasdfads
Boom

DiscordGo

cd /opt
git clone https://github.com/emmaunel/DiscordGo.git && cd DiscordGo
mousepad pkg/util/variables.go
make
It’s also taking advantage of Golang’s cross-platform binary compilation ability.

Payload Delivery

Thanks for being so helpful with my phishing endeavors…
Edit: In hindsight I should have shown how to do this via Discord CDN.

C&C

Also beacons back home to my attack server at 5 minute intervals.
This is a Linux VM that I use for different testing, so some light obfuscation is needed….
Whoop!
“Command didn’t return anything” here is a little misleading.
Don’t ask me why it doesn’t see the Discord installation file…
Whoooooop!
!!!!

Conclusion

References

Main

Alternate Method

Threat Actor Usage

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by grepStrength

Security Researcher | Cyber Risk Analyst | CPTS | GCTI | GICSP | CCSK | CCZT

Responses (2)

Write a response