Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added convert workflow to strip SAML signature #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added convert/.DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions convert/Strip SAML Signature/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Strip SAML Signature

Author: @lpha3ch0

## Usage

Highlight all of the POST data in a SAML request and use the URL Decode workflow to decode it. Then, select only the SAML data and use the Base64 decode workflow. Next, select the SAML data and use this workflow to strip the signature. Finally, Base64 encode the SAML data, URL encode the POST data, and send the request.
92 changes: 92 additions & 0 deletions convert/Strip SAML Signature/Strip SAML Signature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"description": "",
"edition": 2,
"graph": {
"edges": [
{
"source": {
"exec_alias": "exec",
"node_id": 0
},
"target": {
"exec_alias": "exec",
"node_id": 2
}
},
{
"source": {
"exec_alias": "exec",
"node_id": 2
},
"target": {
"exec_alias": "exec",
"node_id": 1
}
}
],
"nodes": [
{
"alias": "convert_start",
"definition_id": "caido/convert-start",
"display": {
"x": -10,
"y": -120
},
"id": 0,
"inputs": [],
"name": "Convert Start",
"version": "0.1.0"
},
{
"alias": "convert_end",
"definition_id": "caido/convert-end",
"display": {
"x": -10,
"y": 140
},
"id": 1,
"inputs": [
{
"alias": "data",
"value": {
"data": "$javascript.data",
"kind": "ref"
}
}
],
"name": "Convert End",
"version": "0.1.0"
},
{
"alias": "javascript",
"definition_id": "caido/code-js",
"display": {
"x": 50,
"y": 20
},
"id": 2,
"inputs": [
{
"alias": "data",
"value": {
"data": "$convert_start.data",
"kind": "ref"
}
},
{
"alias": "code",
"value": {
"data": "export function run(input, sdk) {\n let xml = sdk.asString(input);\n \n // Remove ds:Signature from Response\n xml = xml.replace(/<ds:Signature\\s+xmlns:ds=\"http:\\/\\/www\\.w3\\.org\\/2000\\/09\\/xmldsig#\">[\\s\\S]*?<\\/ds:Signature>/, '');\n \n // Remove ds:Signature from Assertion\n xml = xml.replace(/<ds:Signature\\s+xmlns:ds=\"http:\\/\\/www\\.w3\\.org\\/2000\\/09\\/xmldsig#\">[\\s\\S]*?<\\/ds:Signature>/, '');\n\n return xml;\n}",
"kind": "string"
}
}
],
"name": "Javascript",
"version": "0.1.0"
}
]
},
"id": "4162dba2-a8c4-4074-bde3-9958d4eeec35",
"kind": "convert",
"name": "Strip SAML Signatures"
}