Medusa/modules/Anti-Nuke

Anti-Nuke

Stops a compromised admin account from wiping your server and puts back what it deleted.

Anti-Nuke watches for staff accounts that suddenly start deleting channels, deleting roles, banning or kicking in bulk. When an account goes over a limit, Medusa takes its roles away and rebuilds what it destroyed.

How It Works

Medusa counts destructive actions per account over a rolling 30 second window. If an account deletes more channels or roles, or bans or kicks more members than your limits allow, Medusa:

  1. Removes every role from that account, and bans or times it out if you chose that action.
  2. Recreates deleted roles with their permissions, color and position, then gives them back to the members who had them.
  3. Recreates deleted channels with their permission overwrites, topic and category.
  4. Posts the channel's recent messages back into the new channel through a webhook, keeping each author's name and avatar.
  5. Unbans the members the account banned during the attack.

Medusa takes a snapshot of your channels, roles and member roles when it starts and keeps it current as things change. Messages are kept in memory as they are sent, so only messages posted since Medusa last started can be replayed. Run /antinuke snapshot to refresh the snapshot by hand.

The server owner and Medusa itself are never limited. Add trusted users and roles under Whitelisted Trusted Users and Whitelisted Trusted Roles.

Settings

SettingDefaultWhat it does
Enable Anti-Nuke ProtectionOnTurns the module on or off.
Offender Neutralization ActionStrip All RolesWhat happens to the account: strip roles, strip roles and ban, or strip roles and time out.
Channel Deletion Limit2Channel deletions allowed per 30 seconds.
Role Deletion Limit2Role deletions allowed per 30 seconds.
Ban Limit3Bans allowed per 30 seconds.
Kick Limit3Kicks allowed per 30 seconds.
Automatically Recreate Deleted ChannelsOnRebuilds channels deleted during the attack.
Automatically Recreate & Reassign Deleted RolesOnRebuilds roles and gives them back to their members.
Automatically Unban VictimsOnReverses bans made during the attack.
Webhook Message History RestorationLast 50 MessagesHow many messages to replay into a rebuilt channel: off, 10, 25, 50 or 100.
Whitelisted Trusted UsersNoneUsers the limits never apply to.
Whitelisted Trusted RolesNoneRoles the limits never apply to.

Commands

CommandWhat it does
/antinuke statusShow whether protection is on, the current limits and what is cached.
/antinuke snapshotSave a fresh snapshot of channels, roles and member roles.

Both commands belong to the Admin rank by default. Change that on the dashboard Permissions page.