卷曲和thycotic秘密服务器 - 不知所措

时间:2016-06-08 06:17:00

标签: curl login token

第一次发布海报。

我正在尝试使用thycotic secret server和curl进行一些自动化。但我不能为我的生活弄清楚为什么我不能让curl登录。

我和其他csrf网站多次这样做了,但是这个让我抓狂了。

我尝试保存/发布所有字段,令牌和Cookie但我甚至无法收到“登录错误”

我已经采用了下面的值,保存并用curl发布了它们(当然还有我的用户/通行证)。我将它们发布到/SecretServer/Login.aspx

ScriptManager_HiddenField
__EVENTTARGET
__EVENTARGUMENT
__VIEWSTATE
__VIEWSTATEGENERATOR
__SCROLLPOSITIONX
__SCROLLPOSITIONY
__EVENTVALIDATION
__RequestVerificationToken
LoginUserControl1$HasAddSecretPermissionControl
LoginUserControl1$UserNameTextBox
LoginUserControl1$PasswordTextBox
LoginUserControl1$DomainDropDownList
LoginUserControl1$LoginButton
LoginUserControl1$LoginDialog_IsCollapsed

我做错了什么?如果你想看到实际的登录页面,我在这里设置了一个基于http的演示:

http://h.ixx.io/SecretServer/
user: test
pass: password

1 个答案:

答案 0 :(得分:3)

Secret Server具有基于SOAP的Web服务API,您也可以在此处发送cURL调用。该API可通过 your-secret-server-url / webservices / sswebservice.asmx

获得

要使用API​​进行自动化,您需要先使用验证调用来获取令牌。例如:

curl -v -H "Content-Type: application/x-www-form-urlencoded" -d        "username={NAME}&password={PASSWORD}&organization=&domain=" --url "http://your-secret-server-url/webservices/sswebservice.asmx/Authenticate";

使用该Token,您可以使用其余的API调用来查找Secrets,检索密码等。使用以下内容:

curl -v -H "Content-Type: application/x-www-form-urlencoded" -d "secretId={SECRET ID}&token={TOKEN}" --url "http://your-secret-server-url/webservices/sswebservice.asmx/GetSecretLegacy";

其他cURL文档可在此处找到:https://thycotic.force.com/support/s/article/Accessing-Secret-Server-programmatically-Curl

可以在此处找到API文档: https://updates.thycotic.net/secretserver/documents/SS_WebServicesGuide.pdf?when=02222016