fnet-ctf 2.19.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. fnet/__init__.py +15 -0
  2. fnet/__main__.py +9 -0
  3. fnet/app.py +55 -0
  4. fnet/assets/config.ini +39 -0
  5. fnet/assets/favicon.ico +0 -0
  6. fnet/assets/profile.yaml +120 -0
  7. fnet/assets/shiro_keys.txt +1109 -0
  8. fnet/assets/wordlists/top1000.txt +1742 -0
  9. fnet/assets/wordlists/top10000.txt +9961 -0
  10. fnet/assets/wordlists/top25000.txt +24393 -0
  11. fnet/assets/wordlists/webshell-pass.txt +15940 -0
  12. fnet/assets/wordlists/wifi_top2000.txt +2000 -0
  13. fnet/cli.py +348 -0
  14. fnet/config.py +152 -0
  15. fnet/features/__init__.py +6 -0
  16. fnet/features/arp.py +52 -0
  17. fnet/features/common.py +96 -0
  18. fnet/features/cs.py +244 -0
  19. fnet/features/flag_deep.py +263 -0
  20. fnet/features/flows.py +545 -0
  21. fnet/features/forensics.py +484 -0
  22. fnet/features/http.py +243 -0
  23. fnet/features/ics.py +119 -0
  24. fnet/features/kerberos.py +335 -0
  25. fnet/features/misc.py +113 -0
  26. fnet/features/ntlm.py +228 -0
  27. fnet/features/protocols.py +2105 -0
  28. fnet/features/rdp.py +159 -0
  29. fnet/features/registry.py +376 -0
  30. fnet/features/sql.py +350 -0
  31. fnet/features/text_scan.py +214 -0
  32. fnet/features/tls.py +817 -0
  33. fnet/features/usb.py +139 -0
  34. fnet/features/webshell.py +747 -0
  35. fnet/features/wifi.py +472 -0
  36. fnet/features/winrm.py +219 -0
  37. fnet/findings.py +166 -0
  38. fnet/jobs.py +1168 -0
  39. fnet/live.py +205 -0
  40. fnet/logger.py +211 -0
  41. fnet/paths.py +87 -0
  42. fnet/plugins.py +118 -0
  43. fnet/report.py +585 -0
  44. fnet/services.py +581 -0
  45. fnet/themes.py +64 -0
  46. fnet/tools/__init__.py +1 -0
  47. fnet/tools/runner.py +431 -0
  48. fnet/utils/__init__.py +1 -0
  49. fnet/utils/_hpack_data.py +115 -0
  50. fnet/utils/codec.py +170 -0
  51. fnet/utils/crypto.py +471 -0
  52. fnet/utils/http2.py +663 -0
  53. fnet/utils/kerberos.py +1332 -0
  54. fnet/utils/ldap.py +453 -0
  55. fnet/utils/mail.py +875 -0
  56. fnet/utils/mongodb.py +552 -0
  57. fnet/utils/mysql.py +880 -0
  58. fnet/utils/pcap.py +89 -0
  59. fnet/utils/postgres.py +499 -0
  60. fnet/utils/protocol_detect.py +307 -0
  61. fnet/utils/redis.py +437 -0
  62. fnet/utils/rules.py +365 -0
  63. fnet/utils/smb.py +420 -0
  64. fnet/utils/stream.py +208 -0
  65. fnet/utils/system.py +84 -0
  66. fnet/utils/tlsdeep.py +553 -0
  67. fnet/utils/tunnel.py +636 -0
  68. fnet/utils/webshell.py +439 -0
  69. fnet/utils/websocket.py +265 -0
  70. fnet/utils/wifi.py +925 -0
  71. fnet/webui/__init__.py +1 -0
  72. fnet/webui/server.py +1043 -0
  73. fnet/webui/static/app.js +3118 -0
  74. fnet/webui/static/favicon.ico +0 -0
  75. fnet/webui/static/index.html +570 -0
  76. fnet/webui/static/style.css +911 -0
  77. fnet_ctf-2.19.0.dist-info/METADATA +273 -0
  78. fnet_ctf-2.19.0.dist-info/RECORD +82 -0
  79. fnet_ctf-2.19.0.dist-info/WHEEL +5 -0
  80. fnet_ctf-2.19.0.dist-info/entry_points.txt +2 -0
  81. fnet_ctf-2.19.0.dist-info/licenses/LICENSE +201 -0
  82. fnet_ctf-2.19.0.dist-info/top_level.txt +1 -0
fnet/__init__.py ADDED
@@ -0,0 +1,15 @@
1
+ """Fnet - a cross-platform CTF network traffic analysis toolbox.
2
+
3
+ Fnet organises protocol extraction and decoding into one local WebUI and a
4
+ matching headless CLI. Protocol parsing is delegated to ``tshark`` and the
5
+ analyser itself only uses the Python standard library, so it runs natively on
6
+ Linux, macOS and Windows.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ __version__ = "2.19.0"
11
+ __author__ = "Fnet contributors"
12
+ __license__ = "Apache-2.0"
13
+
14
+ APP_NAME = "Fnet"
15
+ APP_DISPLAY_NAME = "Fnet - CTF 流量分析工具箱"
fnet/__main__.py ADDED
@@ -0,0 +1,9 @@
1
+ """``python -m fnet`` entry point."""
2
+ from __future__ import annotations
3
+
4
+ from fnet.cli import main
5
+
6
+ __all__ = ["main"]
7
+
8
+ if __name__ == "__main__":
9
+ raise SystemExit(main())
fnet/app.py ADDED
@@ -0,0 +1,55 @@
1
+ """Application assembly: one place where the object graph is wired.
2
+
3
+ The WebUI, the CLI and the test suite all build the same :class:`FnetApp`
4
+ so behaviour cannot drift between front-ends.
5
+ """
6
+ from __future__ import annotations
7
+
8
+ from dataclasses import dataclass
9
+
10
+ from fnet.config import Config, load_config
11
+ from fnet.jobs import JobManager
12
+ from fnet.logger import logger
13
+ from fnet.paths import USER_CONFIG, ensure_dirs
14
+ from fnet.plugins import PluginManager
15
+ from fnet.tools.runner import ToolBox
16
+ from fnet.webui.server import FnetApp
17
+
18
+
19
+ @dataclass
20
+ class Runtime:
21
+ """Everything needed to drive an analysis session."""
22
+
23
+ config: Config
24
+ toolbox: ToolBox
25
+ jobs: JobManager
26
+ plugins: PluginManager
27
+ app: FnetApp
28
+
29
+ @property
30
+ def token(self) -> str:
31
+ return self.app.token
32
+
33
+
34
+ def build(config: Config | None = None) -> Runtime:
35
+ ensure_dirs()
36
+ config = config or load_config()
37
+ toolbox = ToolBox(config)
38
+ jobs = JobManager(config, toolbox)
39
+ plugins = PluginManager(config)
40
+ app = FnetApp(config, toolbox, jobs, plugins)
41
+ logger.debug(f"配置: {config.path}")
42
+ return Runtime(config, toolbox, jobs, plugins, app)
43
+
44
+
45
+ def build_from_file(path: str | None = None) -> Runtime:
46
+ return build(Config(path) if path else None)
47
+
48
+
49
+ def describe_environment(runtime: Runtime) -> str:
50
+ """Human readable summary printed on startup and by ``fnet --doctor``."""
51
+ lines = [f"配置文件: {runtime.config.path or USER_CONFIG}"]
52
+ for key in runtime.toolbox.TOOL_NAMES:
53
+ availability = runtime.toolbox.path(key)
54
+ lines.append(f" {key:<14s} {'✓ ' + availability if availability else '✗ 未找到'}")
55
+ return "\n".join(lines)
fnet/assets/config.ini ADDED
@@ -0,0 +1,39 @@
1
+ [config]
2
+ regmatch = (flag\{.+?\}|ctfshow\{.+?\}|hgame\{.+?\}|begin\{.+?\}|ctf\{.+?\});666c6167\w+;(Zmxh[\w+/\=]+|TVpXR0[\w+/\=]+|MZWGCZ[\w+/\=]+);&#102.+;flag\W7B.+\W7D;102 108 52 103( \d+)+;102 49 97 103( \d+)+;10210852103(\d+)+;10210897103;1024952103;1024997103;103 97 109 101;10397109101;107 101 121;107101121;112 97 115 115;11297115115;43 54 46;435446;46 31 34 47;46 31 41 47;46 4C 34 47;46 4C 41 47;46313447;46314147;464C3447;464C4147;47 41 4D 45;47414D45;4B 45 59;4B4559;50 41 53 53;50415353;63 74 66;637466;66 31 34 67;66 31 61 67;66 6C 34 67;66 6C 61 67;66313467;66316167;666C3467;666C6167;67 61 6D 65;67616D65;6B 65 79;6B6579;70 61 73 73;70617373;99 116 102;99116102;@IH<;A2V5;AO.MG;ASIS;CGFZC;CNFF;CTF;F#S<;F14G;F1AG;FL4G;GAME;KEY;MZWGCZ;PASS;PGS;Q0NURG;Q1RG;R0FNR;RJE0R;RJFBR;RKW0R;RKXBR;RLX;S0VZ;S69T;S6NT;SEC;SY9T;SYNT;TNZR;U.C5EC;UEFTU;W^7?+;Y3RM;Z2FTZ;ZABAMAWA;ZJE0Z;ZJFHZ;ZMW0Z;ZMXHZ;504b0304;select;flag
3
+ passwddir = wordlists/top25000.txt
4
+ javapath = java
5
+ font = JetBrains Mono
6
+ font_size = 12
7
+ theme = dark
8
+ thread_count = 50
9
+ tshark =
10
+ wireshark =
11
+ host = 127.0.0.1
12
+ port = 8765
13
+ open_browser = 1
14
+ max_upload_mb = 1024
15
+ sql_success =
16
+ sql_time_threshold = 1.0
17
+
18
+ [plugins]
19
+ execute_cmd = {}
20
+
21
+ [paths]
22
+ tls_keylog =
23
+ tls_private_key =
24
+ tls_key_passphrase =
25
+ cobaltstrike_keys =
26
+ rdp_keylog =
27
+ rdp_private_key =
28
+ antsword_rsa_public_key =
29
+ minidump =
30
+ hashcat =
31
+ john =
32
+ aircrack =
33
+ foremost =
34
+ pcapfix =
35
+ etl2pcapng =
36
+
37
+ [recent]
38
+ files =
39
+
Binary file
@@ -0,0 +1,120 @@
1
+ Apple:
2
+ - Company_ID: '0x05ac'
3
+ Company_name: Apple, Inc.
4
+ - Device_DefName: ANSI
5
+ Device_ID: '0x024f'
6
+ Device_Name: Aluminium Keyboard (ANSI)
7
+ Device_Type: KeyBoard
8
+ Company_List:
9
+ - '0x046d': LOG
10
+ '0x056a': WACOM
11
+ '0x05ac': Apple
12
+ '0x1532': Razer
13
+ '0x18f8': Maxxter
14
+ '0x248a': Maxxter
15
+ Default:
16
+ - datalen: 8
17
+ name: Default Mouse
18
+ type: Mouse
19
+ - datalen: 16
20
+ name: Default KeyBoard
21
+ type: KeyBoard
22
+ HP:
23
+ - Company_ID: '0x03f0'
24
+ Company_name: HP, Inc
25
+ LOG:
26
+ - Company_ID: '0x046d'
27
+ Company_name: Logitech, Inc.
28
+ - Device_DefName: LOG_Lightspeed_Reveiver
29
+ Device_ID: '0xc539'
30
+ Device_Name: Lightspeed Receiver
31
+ Device_Type: Mouse
32
+ - Device_DefName: G402_Gaming_Mouse
33
+ Device_ID: '0xc07e'
34
+ Device_Name: G402 Gaming Mouse
35
+ Device_Type: Mouse
36
+ - Device_DefName: LOG_G502_MOUSE
37
+ Device_ID: '0xc08b'
38
+ Device_Name: Logitech G502 SE HERO Gaming Mouse
39
+ Device_Type: Mouse
40
+ - Device_DefName: Mouse
41
+ Device_ID: '0xc077'
42
+ Device_Name: Logitech Mouse
43
+ Device_Type: Mouse
44
+ - Device_DefName: Unknown_keyboard
45
+ Device_ID: '0xc341'
46
+ Device_Name: Logitech Unknow Keyboard Type
47
+ Device_Type: KeyBoard
48
+ - Device_DefName: G304_Wireless
49
+ Device_ID: '0xc53f'
50
+ Device_Name: G304 Wireless
51
+ Device_Type: Mouse
52
+ - Device_DefName: G102_Wire
53
+ Device_ID: '0xc09d'
54
+ Device_Name: G102 Wire
55
+ Device_Type: Mouse
56
+ - Device_DefName: M90_M100_Mouse
57
+ Device_ID: '0xc05a'
58
+ Device_Name: M90/M100 Optical Mouse
59
+ Device_Type: Mouse
60
+ - Device_DefName: G402_Gaming_Mouse
61
+ Device_ID: '0xc092'
62
+ Device_Name: G102/G203 LIGHTSYNC Gaming Mouse
63
+ Device_Type: Mouse
64
+ Maxxter:
65
+ - Company_ID: '0x18f8'
66
+ Company_name: Maxxter
67
+ - Device_DefName: Maxxter_OpticalGaming_Mouse
68
+ Device_ID: '0x0f97'
69
+ Device_Name: Optical Gaming Mouse [Xtrem]
70
+ Device_Type: Mouse
71
+ - Device_DefName: Wireless_Optical_Mouse_ACT
72
+ Device_ID: '0x8366'
73
+ Device_Name: Wireless Optical Mouse ACT-MUSW-002
74
+ Device_Type: Mouse
75
+ Razer:
76
+ - Company_ID: '0x1532'
77
+ Company_name: Razer USA, Ltd
78
+ - Device_DefName: Basilisk_Mouse
79
+ Device_ID: '0x0083'
80
+ Device_Name: RC30-0315, Gaming Mouse [Basilisk x HyperSpeed]
81
+ Device_Type: Mouse
82
+ - Device_DefName: DeathAdder_Mouse
83
+ Device_ID: '0x004f'
84
+ Device_Name: RZ01-0145, Gaming Mouse [DeathAdder 2000 (Alternate)]
85
+ Device_Type: Mouse
86
+ - Device_DefName: Razer_UnkownType_Mouse
87
+ Device_ID: '0x0098'
88
+ Device_Name: Razer UnknownType Mouse
89
+ Device_Type: Mouse
90
+ - Device_DefName: Razer_UnkownType_Mouse2
91
+ Device_ID: '0x0094'
92
+ Device_Name: Razer UnknownType Mouse 2
93
+ Device_Type: Mouse
94
+ Unknown:
95
+ '0x093a':
96
+ Company_ID: '0x093a'
97
+ Device_DefName: Mouse_Like_1
98
+ Device_ID: '0x2530'
99
+ Device_Type: Mouse Like
100
+ '0x2341':
101
+ Company_ID: '0x2341'
102
+ Device_DefName: KeyBoard_Like_1
103
+ Device_ID: '0x8036'
104
+ Device_Type: Keyboard Like
105
+ '0x256c':
106
+ Company_ID: '0x256c'
107
+ Device_DefName: Wacom_Like_1
108
+ Device_ID: '0x006d'
109
+ Device_Type: Wacom Like
110
+ WACOM:
111
+ - Company_ID: '0x056a'
112
+ Company_name: Wacom Co., Ltd
113
+ - Device_DefName: CTL_480
114
+ Device_ID: '0x030e'
115
+ Device_Name: CTL-480 [Intuos Pen (S)]
116
+ Device_Type: wacom
117
+ - Device_DefName: PTH_660
118
+ Device_ID: '0x0357'
119
+ Device_Name: PTH-660 [Intuos Pro (M)]
120
+ Device_Type: wacom