Files
tldr/pages.zh/linux/rpcclient.md

36 lines
893 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# rpcclient
> MS-RPC 客户端工具samba 套件的一部分)。
> 更多信息:<https://www.samba.org/samba/docs/current/man-html/rpcclient.1.html>。
- 连接到远程主机:
`rpcclient --user {{domain}}\{{username}}%{{password}} {{ip}}`
- 以无密码的方式连接到域上的远程主机:
`rpcclient --user {{username}} --workgroup {{domain}} --no-pass {{ip}}`
- 连接到远程主机,传递密码哈希:
`rpcclient --user {{domain}}\{{username}} --pw-nt-hash {{ip}}`
- 在远程主机上执行 shell 命令:
`rpcclient --user {{domain}}\{{username}}%{{password}} --command {{semicolon_separated_commands}} {{ip}}`
- 显示域用户:
`rpcclient $> enumdomusers`
- 显示权限:
`rpcclient $> enumprivs`
- 显示特定用户的信息:
`rpcclient $> queryuser {{username|rid}}`
- 在域中创建新用户:
`rpcclient $> createdomuser {{username}}`