Fapro – Free, Cross-platform, Single-file mass network protocol server simulator

FaPro is a Fake Protocol Server tool, Can easily start or stop multiple network services.

The goal is to support as many protocols as possible, and support as many deep interactions as possible for each protocol.

Features

  • Supported Running Modes:
    • Local Machine
    • Virtual Network
  • Supported Protocols:
    • DNS
    • DCE/RPC
    • EIP
    • Elasticsearch
    • FTP
    • HTTP
    • IEC 104
    • Memcached
    • Modbus
    • MQTT
    • MySQL
    • RDP
    • Redis
    • S7
    • SMB
    • SMTP
    • SNMP
    • SSH
    • Telnet
    • VNC
    • IMAP
    • POP3
  • Use TcpForward to forward network traffic
  • Support tcp syn logging

Protocol simulation demos

Rdp

Support credssp ntlmv2 nla authentication.

Support to configure the image displayed when user login.

AVvXsEiuMjdLcPd9eavE4tZ0q8WccugfeTpnSw3wzxw2mpO ijfIXxhhWWAny5kthIVnfxsy9IBfHP1VAvaFGu7Eu3JIds8cTND19gMabdasVvEFYkSEBf3MjQ5UtYrgOHaskmxF7pYrtyZWqMaGFr1IaVNd9TyDPGpbOk6WMUl8 27U7snY3jSJ9P8QLADo9Q=w640 h394

SSH

Support user login.

Support fake terminal commands, such as id, uid, whoami, etc.

Account format: username:password:home:uid

AVvXsEj3rqg UHR8FVD1AenjbEXGrvH7NrbHE 2Tx6TNYX fupBrU8yDRqdtjBf X3qP2McVhzM5RHgLiN8N62oRkJgMhPGnaTEqsSDp720MbJ61usRcU6DUAoeS F1wNGeYmpGqQ1XhdNAtGJJbzvBYWq JiuJ9onyslvfgJmm33VMt xk78I003vYXfA 3ZQ=w640 h444

IMAP & SMTP

Support user login and interaction.

AVvXsEjsxp1cGMLACtSsZ0I7felgtDlJCus jrhqACOu0uoW2lyxL3Nb4TUHfoK39GxsTv9LlUVR1LmOEeAi3UrXwQo czX4bdPmNpuoTTqQTZx7LUVIDGSSm3Mvu 43fbg6NjlxTczoPR d8XNHZUsp FaCoh4s3ZZkIfcfYIQOYI3oHgu2WQRgx1Hdm4KOQw=w640 h362

Mysql

Support sql statement query interaction

AVvXsEhaRTZr Bgs9 XvFUDtBjdOlADvDWMUXHmgaX2wlg9bRQazVBB9R19NTmA337p Iic8UFEGx3v2YuchH6w59049 xOAcouhJnbVtxea1RBnZFfBTopC6i4C2hnS0hH1R2zvD3BegV0lAS A4oSNSzDFslIEz2yF3vyLupzUux88azwyxWcfxyKiJtVzA=w640 h368

HTTP

Support website clone, You need to install the chrome browser and chrome driver to work.

Quick Start

Generate Config

The configuration of all protocols and parameters is generated by genConfig subcommand.

Use 172.16.0.0/16 subnet to generate the configuration file:

fapro genConfig -n 172.16.0.0/16 > fapro.json

Or use local address instead of the virtual network:

fapro genConfig > fapro.json

Run the protocol simulator

Run FaPro in verbose mode and start the web service on port 8080:

fapro run -v -l :8080

Tcp syn logging

For windows users, please install winpcap or npcap.

Log analysis

Use ELK to analyze protocol logs:

AVvXsEjqXQMNerBSmPXLA3QqAIgJBu9KMu 0e7tGzjqIPJJpeKxmKskmMA0KvEB9urP8oPE0PBm8FAcVziVaoT5LfpEUxKl2oyvUwnDBCawV96QoxKRiv99zuvmOw5ALyhYQDBDt2kudkhtzGen PBeYtXnGxGZ7bNtOOkwcXgjVCWzwqRkgpK5gCYJ3jwVwaQ=w640 h370

Configuration

This section contains the sample configuration used by FaPro.

{
"version": "0.38",
"network": "127.0.0.1/32",
"network_build": "localhost",
"storage": null,
"geo_db": "/tmp/geoip_city.mmdb",
"hostname": "fapro1",
"use_logq": true,
"cert_name": "unknown",
"syn_dev": "any",
"exclusions": [],
"hosts": [
{
"ip": "127.0.0.1",
"handlers": [
{
"handler": "dcerpc",
"port": 135,
"params": {
"accounts": [
"administrator:123456",
],
"domain_name": "DESKTOP-Q1Test"
}
}
]
}
]
}
  • version: Configuration version.
  • network: The subnet used by the virtual network or the address bound to the local machine(Local mode).
  • network_build: Network mode(supported value: localhost, all, userdef)
    • localhost: Local mode, all services are listening on the local machine
    • all: Create all hosts in the subnet(i.e., Can ping all the host in the subnet)
    • userdef: Create only the hosts specified in the hosts configuration.
  • storage: Specify the storage used for log collection, support sqlite, mysql, elasticsearch. e.g.
  • geo_db: MaxMind geoip2 database file path, used to generate ip geographic location information. if you use Elasticsearch storage, never need this field, it will be automatically generated using the geoip processor of Elasticsearch.
  • hostname: Specify the host field in the log.
  • use_logq: Use local disk message queue to save logs, and then send it to remote mysql or Elasticsearch to prevent remote log loss.
  • cert_name: Common name of the generated certificate.
  • syn_dev: Specify the network interface used to capture tcp syn packets. If it is empty, the tcp syn packet will not be recorded. On windows, the device name is like “DeviceNPF_{xxxx-xxxx}”.
  • exclusions: Exclude remote ips from logs.
  • hosts: Each item is a host configuration.
  • handlers: Service configuration, the service configured on the host, each item is a service configuration.
  • handler: Service name (i.e., protocol name)
  • params: Set the parameters supported by the service.

Example

Create a virtual network, The subnet is 172.16.0.0/24, include 2 hosts,

172.16.0.3 run dns, ssh service,

and 172.16.0.5 run rpc, rdp service,

protocol access logs are saved to elasticsearch, exclude the access log of 127.0.0.1.

{
"version": "0.38",
"network": "172.16.0.0/24",
"network_build": "userdef",
"storage": "es://http://127.0.0.1:9200",
"use_logq": true,
"cert_name": "unknown",
"syn_dev": "any",
"geo_db": "",
"exclusions": ["127.0.0.1"],
"hosts": [
{
"ip": "172.16.0.3",
"handlers": [
{
"handler": "dns",
"port": 53,
"params": {
"accounts": [
"admin:123456"
],
"appname": "domain"
}
},
{
"handler": "ssh",
"port": 22,
"params": {
"accounts": [
"root:5555555:/root:0"
],
"prompt": "$ ",
"server_version": "SSH-2.0-OpenSSH_7.4"
}
}
]
},
{
"ip": "172.16.0.5",
"handlers": [
{
"handler": "dcerpc",
"port": 135,
"params": {
"accounts": [
"administrator:123456"
],
"domain_name": "DESKTOP-Q1Test"
}
},
{
"handler": "rdp",
"port": 3389,
"params": {
"accounts": [
"administrator:123456"
],
"auth": false,
"domain_name": "DESKTOP-Q1Test",
"image": "rdp.jpg",
"sec_layer": "auto"
}
}
]
}
]
}

FAQ

We have collected some frequently asked questions. Before reporting an issue, please search if the FAQ has the answer to your problem.

Contributing

  • Issues are welcome.

CnJZy6huyrw

click here to read full Article

Read More on Pentesting Tools

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: