All Projects → sensepost → Mallet

sensepost / Mallet

Mallet is an intercepting proxy for arbitrary protocols

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Mallet

Okra
High performance game server framework by netty and disruptor
Stars: ✭ 152 (-23.62%)
Mutual labels:  netty
Sofa Bolt
SOFABolt is a lightweight, easy to use and high performance remoting framework based on Netty.
Stars: ✭ 2,057 (+933.67%)
Mutual labels:  netty
Kcp Netty
Java implementation of KCP based on Netty
Stars: ✭ 184 (-7.54%)
Mutual labels:  netty
Agentx
Shadowsocks升级版,支持协议伪装和流量压缩,易于扩展,可统计流量
Stars: ✭ 154 (-22.61%)
Mutual labels:  netty
Rsocket Java
Java implementation of RSocket
Stars: ✭ 2,099 (+954.77%)
Mutual labels:  netty
Source Code Hunter
😱 从源码层面,剖析挖掘互联网行业主流技术的底层实现原理,为广大开发者 “提升技术深度” 提供便利。目前开放 Spring 全家桶,Mybatis、Netty、Dubbo 框架,及 Redis、Tomcat 中间件等
Stars: ✭ 7,392 (+3614.57%)
Mutual labels:  netty
Netty Learning Example
🥚 Netty实践学习案例,见微知著!带着你的心,跟着教程。我相信你行欧。
Stars: ✭ 2,146 (+978.39%)
Mutual labels:  netty
Him Netty
开源的H5即时聊天系统 spring-boot + netty + protobuf + vue ~
Stars: ✭ 194 (-2.51%)
Mutual labels:  netty
Netty 4 User Guide
Chinese translation of Netty 4.x User Guide. 中文翻译《Netty 4.x 用户指南》
Stars: ✭ 2,061 (+935.68%)
Mutual labels:  netty
Nettydemo
Netty应用到Android,包含客户端、服务端(断线重连、心跳、黏包处理)
Stars: ✭ 183 (-8.04%)
Mutual labels:  netty
Vert.x
Vert.x is a tool-kit for building reactive applications on the JVM
Stars: ✭ 12,544 (+6203.52%)
Mutual labels:  netty
Esl Client
A Fork from http://git.freeswitch.org/git/freeswitch-contrib/tree/dvarnes/java/esl-client
Stars: ✭ 160 (-19.6%)
Mutual labels:  netty
Go Netty
Extensible network application framework inspired by netty
Stars: ✭ 174 (-12.56%)
Mutual labels:  netty
Nettychat
基于Netty+TCP+Protobuf实现的Android IM库,包含Protobuf序列化、TCP拆包与粘包、长连接握手认证、心跳机制、断线重连机制、消息重发机制、读写超时机制、离线消息、线程池等功能。
Stars: ✭ 1,979 (+894.47%)
Mutual labels:  netty
Blynk Server
Blynk is an Internet of Things Platform aimed to simplify building mobile and web applications for the Internet of Things. Easily connect 400+ hardware models like Arduino, ESP8266, ESP32, Raspberry Pi and similar MCUs and drag-n-drop IOT mobile apps for iOS and Android in 5 minutes
Stars: ✭ 8 (-95.98%)
Mutual labels:  netty
Mango
A high-performance, open-source java RPC framework.
Stars: ✭ 150 (-24.62%)
Mutual labels:  netty
Code4java
Repository for my java projects.
Stars: ✭ 164 (-17.59%)
Mutual labels:  netty
Donkey
Modern Clojure HTTP server and client built for ease of use and performance
Stars: ✭ 199 (+0%)
Mutual labels:  netty
Catacumba
Asynchronous web toolkit for clojure built on top of Ratpack / Netty
Stars: ✭ 192 (-3.52%)
Mutual labels:  netty
Doe
自己编写dubbo客户端实现rpc调用,在线调试dubbo接口、dubbo接口可视化测试、自动化测试工具。
Stars: ✭ 183 (-8.04%)
Mutual labels:  netty

Mallet, a framework for creating proxies

Mallet is a tool for creating proxies for arbitrary protocols, along similar lines to the familiar intercepting web proxies, just more generic.

It is built upon the Netty framework, and relies heavily on the Netty pipeline concept, which allows the graphical assembly of graphs of handlers. (See Screenshots below for an example.) In the Netty world, handler instances provide frame delimitation (i.e. where does a message start and end), protocol decoding and encoding (converting a stream of bytes into Java objects, and back again, or converting a stream of bytes into a different stream of bytes - think compression and decompression), and higher level logic (actually doing something with those objects).

By following the careful separation of Codecs from Handlers that actually manipulate the messages, Mallet can benefit from the large library of existing Codecs, and avoid reimplementation of many protocols. The final piece of the puzzle is provided by a Handler that copies messages received on one pipeline to another pipeline, proxying those messages on to their final destination.

Of course, while the messages are within Mallet, they can easily be tampered with, either with custom Handlers written in Java or a JSR-223 compliant scripting language, or manually, using one of the provided editors.

You can get an idea of the available codecs by looking at the Netty source at GitHub, under the codec* directories. Or just by googling for netty and the protocol you are interested in. Many interesting protocol implementations have been developed outside of the core Netty project, but should still work well with Mallet.

Who might use Mallet?

Mallet is aimed at people working with networked applications that are not based on HTTP communications. Examples might be Internet of Things, which could use MQTT, COAP, etc, ATM's and Point of Sale devices which might use ISO8583, or, to be honest, any other protocol.

In fact, Mallet may even be useful for HTTP-based applications, which use additional protocols within HTTP. For example, Google Protobuf over WebSockets, which are not well supported by existing HTTP proxies such as Burp, Zap, etc, or gRPC over HTTP2.

Mallet is not necessarily only for security reviews. Because Mallet is built on top of the Netty Framework, once your pipeline has been prototyped using Mallet, you can migrate your code into a plain Netty application with very little effort.

Screenshots

This is an example of a simple SOCKS proxy, which can be used as the first step when understanding the network traffic you are seeing.

Mallet New Diagram

Once you have an idea of what the traffic actually looks like, you can start adding appropriate ChannelHandler classes along the pipeline.

Building Mallet

Mallet makes use of Maven, so compiling the code is a matter of

mvn package

To run it:

cd target/
java -jar mallet-1.0-SNAPSHOT-spring-boot.jar

There are a few sample graphs provided in the examples/ directory. The JSON graphs expect a JSON client to connect to Mallet on localhost:9998/tcp, with the real server at localhost:9999/tcp. Only the last JSON graph (json5.mxe) makes any assumptions about the structure of the JSON messages being passed, so they should be applicable to any app that sends JSON messages.

The demo.mxe shows a complex graph, with two pipelines, both TCP and UDP. The TCP pipeline is built to support HTTP and HTTPS on ports 80 and 443 respectively, as well as WebSockets, while relaying any other traffic directly to its destination. The UDP pipeline is built to process DNS requests on localhost:1053/udp, replace queries for google.com with queries for www.sensepost.com, and forward the requests on to Google DNS servers.

Feedback and contributions

Feedback and contributions are welcome. Please create issues where appropriate, or contact the author on Twitter @RoganDawes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].