Comments (4)
Thanks for raising this. This is an unfortunate side effect of Discord taking an unusual webhook format, and as a result not working with the standard output (though it's certainly interesting that the "/slack" inclusion actually makes it behave, I wouldn't have expected that).
We've had internal chatter in the past about adapting the webhook functionality to support Discord, but until now that hasn't come to anything. I'll raise this again and we'll get this working ASAP - so thanks again for the nudge!
from canarytokens.
This issue is stale because it has been open for 14 days with no activity.
from canarytokens.
Hey @quinn-thinkst thanks for the reply.
I found a way to do it by transforming the JSON payload being sent by using webhookrelay.com
They use lua for the transform, I'll leave the snippet I used to get it going (for others interested in this solution)
local json = require("json")
local body, err = json.decode(r.RequestBody)
if err then error(err) end
local token_type = body["token_type"]
local src_ip = body["src_ip"]
local time = body["time"]
local memo = body["memo"]
local message = "Canary triggered @ " .. body["time"] .. " src_ip: " .. body["src_ip"] .. " Source: " .. body["memo"] .. " Manage URL: " .. body["manage_url"]
-- Preparing Discord payload
local discord = {
username= "OpenCanary",
content= message
}
local result, err = json.encode(discord)
-- Set modified request body
r:SetRequestBody(result)
from canarytokens.
Hey @chrisreeves-
I'm sorry this has taken a little while to get sorted (that's on me). Official support for discord webhooks is up and running now, so you can setup your tokens directly hooked into discord rather than needing an intermediary (but nice find on the relay - that's a nifty hack that should be usable for any case of an unsupported webhook).
Thanks again for raising this issue, and please do shout if you bump into any issues with the feature!
from canarytokens.
Related Issues (20)
- Simple Typo Fix on Template HOT 1
- Thwarting Malware HOT 2
- Support Wildcard CORS Headers HOT 9
- Credit Card token (beta) not working HOT 3
- EH HOT 1
- [BUG] "Sensitive command hostname" & "Sensitive command username" or "Sensitive Command Information" missing from alerts HOT 9
- Ability to trigger token based on user
- [BUG] Web bug token serves images with html header HOT 1
- mail HOT 3
- Phone hack HOT 1
- [BUG] "An error has occurred: Internal Server Error" message when trying to create a credit card token HOT 6
- [BUG] error webhook sent with wrong content-type HOT 1
- Enable wildcard CORS support HOT 12
- [BUG] Unable to add Azure Logic App Webhook URL HOT 4
- [BUG] Microsoft Teams Webhook not functioning HOT 1
- Support IP2Location.io API HOT 4
- [BUG] AWS Keys will not generate with webhook or email HOT 1
- Windows folder token not working HOT 7
- Exploit - CSV Injection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canarytokens.