├── README.md
├── README
├── image-20220304130302359.png
├── image-20220304130326063.png
└── image-20220304130353628.png
├── rpcscan.cna
├── rpcscan.dll
└── rpcscan
├── Backup
└── reflective_dll.sln
├── reflective_dll.sln
├── reflective_dll.vcproj
├── reflective_dll.vcxproj
├── reflective_dll.vcxproj.filters
├── reflective_dll.vcxproj.user
├── rpc.c
├── rpc.h
├── src
├── ReflectiveDLLInjection.h
├── ReflectiveDll.c
├── ReflectiveLoader.c
└── ReflectiveLoader.h
└── thread_pool.hpp
/README.md:
--------------------------------------------------------------------------------
1 | # RPCSCAN
2 |
3 | RPC远程主机信息匿名扫描工具。通过此工具,能在没有帐号密码的情况下,获取远程主机的RPC映射图,通过uuid来匹配相关进程达到主机信息收集的目的。(当前支持360.exe和VPN api的探测,后续将继续添加更多的程序支持)
4 |
5 | ## Install
6 |
7 | 将rpcscan.dll和rpcscan.cna放同一个目录,后用CS导入CNA即可
8 |
9 | ## Usage
10 |
11 | ```
12 | beacon> ? rpcscan
13 | Use: rpcscan [ips] [thread num]
14 |
15 | rpc info scan and get process
16 | ```
17 |
18 | 扫描单ip:`rpcscan 172.16.178.5`
19 |
20 | 
21 |
22 | 100线程扫描172.16.178.5的C段:`rpcscan 172.16.178.5/24 100`
23 |
24 | 
25 |
26 |
--------------------------------------------------------------------------------
/README/image-20220304130302359.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JDArmy/RPCSCAN/627ab955d4c97a06b33c56faf31e9843bd19a7fa/README/image-20220304130302359.png
--------------------------------------------------------------------------------
/README/image-20220304130326063.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JDArmy/RPCSCAN/627ab955d4c97a06b33c56faf31e9843bd19a7fa/README/image-20220304130326063.png
--------------------------------------------------------------------------------
/README/image-20220304130353628.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JDArmy/RPCSCAN/627ab955d4c97a06b33c56faf31e9843bd19a7fa/README/image-20220304130353628.png
--------------------------------------------------------------------------------
/rpcscan.cna:
--------------------------------------------------------------------------------
1 | $uuid = @();
2 | $uuid[0] = "ac109027-2eb9-4d3e-ab82-d2f8da000d5d";
3 | $uuid[1] = "650a7e26-eab8-5533-ce43-9c1dfce11511";
4 | $uuid[2] = "0d3c7f20-1c8d-4654-a1b3-51563b298bda";
5 | $uuid[3] = "12345678-1234-ABCD-EF00-0123456789AB";
6 |
7 | $process = @();
8 | $process[0] = "360.exe";
9 | $process[1] = "vpn api";
10 | $process[2] = "UserMgrCli";
11 | $process[3] = "Spoolsv";
12 |
13 | alias rpcscan {
14 | if (-is64 $1) {
15 | ($cmd, $host, $threadnum) = split(' ', $0);
16 | # println($0);
17 | # println($host);
18 | # println($threadnum);
19 |
20 | $bufstr = "";
21 | if ($threadnum == ""){
22 | $threadnum = 5;
23 | }
24 |
25 | foreach $index => $value ($uuid)
26 | {
27 | $p = $process[$index];
28 | $u = $value;
29 | $paddingp = chr(0x00) x (40 - strlen($p));
30 | $pathcu = chr(0x00) x (40 - strlen($u));
31 | $bufstr = "$bufstr$p$paddingp$u$pathcu";
32 | }
33 |
34 | $hostpadding = chr(0x00) x (20 - strlen($host));
35 | $host = "$host$hostpadding";
36 |
37 | $buffer = allocate(1024);
38 |
39 | writeb($buffer, $host);
40 |
41 | writeb($buffer, pack("i-", 135));
42 |
43 | writeb($buffer, pack("i-", $index + 1));
44 |
45 | writeb($buffer, pack("i-", $threadnum));
46 |
47 | writeb($buffer, $bufstr);
48 |
49 | closef($buffer);
50 | $b = readb($buffer, -1);
51 |
52 | bdllspawn($1, script_resource("rpcscan.dll"), "$[1024]b", "rpcscan.dll", 5000, false);
53 | }else{
54 | println("\c4[-]\c0 rpcscan: x64 system support");
55 | }
56 | }
57 |
58 |
59 | beacon_command_register(
60 | "rpcscan",
61 | "rpc info scan and get process",
62 | "Use: rpcscan [ips] [thread num]\n\nrpc info scan and get process");
63 |
--------------------------------------------------------------------------------
/rpcscan.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JDArmy/RPCSCAN/627ab955d4c97a06b33c56faf31e9843bd19a7fa/rpcscan.dll
--------------------------------------------------------------------------------
/rpcscan/Backup/reflective_dll.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual C++ Express 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reflective_dll", "reflective_dll.vcproj", "{3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|Win32.ActiveCfg = Release|Win32
13 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|Win32.Build.0 = Release|Win32
14 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|Win32.ActiveCfg = Release|Win32
15 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/rpcscan/reflective_dll.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31019.35
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reflective_dll", "reflective_dll.vcxproj", "{3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|Win32.ActiveCfg = Release|x64
17 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|Win32.Build.0 = Release|x64
18 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|x64.ActiveCfg = Debug|x64
19 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Debug|x64.Build.0 = Debug|x64
20 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|Win32.ActiveCfg = Release|Win32
21 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|Win32.Build.0 = Release|Win32
22 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|x64.ActiveCfg = Release|Win32
23 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}.Release|x64.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {C1819E38-7BF6-4108-8B06-221DA9D3582E}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/rpcscan/reflective_dll.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
15 |
18 |
19 |
20 |
21 |
22 |
29 |
32 |
35 |
38 |
41 |
44 |
55 |
58 |
61 |
64 |
71 |
74 |
77 |
80 |
83 |
86 |
89 |
92 |
93 |
100 |
103 |
106 |
109 |
112 |
116 |
127 |
130 |
133 |
136 |
143 |
146 |
149 |
152 |
155 |
158 |
161 |
164 |
165 |
173 |
176 |
179 |
182 |
185 |
188 |
200 |
203 |
206 |
209 |
218 |
221 |
224 |
227 |
230 |
233 |
236 |
240 |
241 |
249 |
252 |
255 |
258 |
261 |
265 |
280 |
283 |
286 |
289 |
299 |
302 |
305 |
308 |
311 |
314 |
317 |
321 |
322 |
323 |
324 |
325 |
326 |
331 |
334 |
335 |
338 |
339 |
340 |
345 |
348 |
349 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
--------------------------------------------------------------------------------
/rpcscan/reflective_dll.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | ARM
7 |
8 |
9 | Debug
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | ARM
19 |
20 |
21 | Release
22 | Win32
23 |
24 |
25 | Release
26 | x64
27 |
28 |
29 |
30 | {3A371EBD-EEE1-4B2A-88B9-93E7BABE0949}
31 | reflective_dll
32 | Win32Proj
33 | 10.0
34 |
35 |
36 |
37 | DynamicLibrary
38 | v142
39 | MultiByte
40 | true
41 |
42 |
43 | DynamicLibrary
44 | v142
45 | MultiByte
46 | true
47 |
48 |
49 | DynamicLibrary
50 | v142
51 | Unicode
52 |
53 |
54 | DynamicLibrary
55 | v142
56 | Unicode
57 |
58 |
59 | DynamicLibrary
60 | v142
61 | MultiByte
62 | false
63 |
64 |
65 | DynamicLibrary
66 | v142
67 | Unicode
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 | <_ProjectFileVersion>11.0.50727.1
93 |
94 |
95 | $(SolutionDir)$(Configuration)\
96 | $(Configuration)\
97 | true
98 | MinimumRecommendedRules.ruleset
99 |
100 |
101 |
102 |
103 | true
104 | MinimumRecommendedRules.ruleset
105 |
106 |
107 |
108 |
109 | $(SolutionDir)$(Platform)\$(Configuration)\
110 | $(Platform)\$(Configuration)\
111 | true
112 | MinimumRecommendedRules.ruleset
113 |
114 |
115 |
116 |
117 | $(SolutionDir)$(Configuration)\
118 | $(Configuration)\
119 | false
120 | MinimumRecommendedRules.ruleset
121 |
122 |
123 |
124 |
125 | false
126 | MinimumRecommendedRules.ruleset
127 |
128 |
129 |
130 |
131 | $(SolutionDir)$(Platform)\$(Configuration)\
132 | $(Platform)\$(Configuration)\
133 | false
134 | MinimumRecommendedRules.ruleset
135 |
136 |
137 | $(IncludePath)
138 |
139 |
140 |
141 | Disabled
142 | WIN32;_DEBUG;_WINDOWS;_USRDLL;REFLECTIVE_DLL_EXPORTS;%(PreprocessorDefinitions)
143 | true
144 | EnableFastChecks
145 | MultiThreadedDebugDLL
146 |
147 | Level3
148 | EditAndContinue
149 | stdcpp17
150 |
151 |
152 | true
153 | Windows
154 | MachineX86
155 |
156 |
157 |
158 |
159 | Disabled
160 | WIN32;_DEBUG;_WINDOWS;_USRDLL;REFLECTIVE_DLL_EXPORTS;%(PreprocessorDefinitions)
161 | true
162 | EnableFastChecks
163 | MultiThreadedDebugDLL
164 |
165 |
166 | Level3
167 | EditAndContinue
168 | stdcpp17
169 |
170 |
171 | true
172 | Windows
173 |
174 |
175 |
176 |
177 | X64
178 |
179 |
180 | Disabled
181 | WIN32;_DEBUG;_WINDOWS;_USRDLL;REFLECTIVE_DLL_EXPORTS;%(PreprocessorDefinitions)
182 | true
183 | EnableFastChecks
184 | MultiThreadedDebugDLL
185 |
186 | Level3
187 | ProgramDatabase
188 | stdcpp17
189 |
190 |
191 | false
192 | Windows
193 | MachineX64
194 |
195 |
196 |
197 |
198 | MaxSpeed
199 | OnlyExplicitInline
200 | true
201 | WIN32;NDEBUG;_WINDOWS;_USRDLL;WIN_X86;REFLECTIVE_DLL_EXPORTS;REFLECTIVEDLLINJECTION_VIA_LOADREMOTELIBRARYR;REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN;%(PreprocessorDefinitions)
202 | MultiThreaded
203 | true
204 |
205 | Level3
206 | ProgramDatabase
207 | stdcpp17
208 |
209 |
210 | true
211 | Windows
212 | true
213 | true
214 | MachineX86
215 |
216 |
217 | copy ..\Release\reflective_dll.dll ..\bin\
218 |
219 |
220 |
221 |
222 | MinSpace
223 | OnlyExplicitInline
224 | true
225 | WIN32;NDEBUG;_WINDOWS;_USRDLL;WIN_ARM;REFLECTIVE_DLL_EXPORTS;REFLECTIVEDLLINJECTION_VIA_LOADREMOTELIBRARYR;REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN;%(PreprocessorDefinitions)
226 | MultiThreaded
227 | true
228 |
229 |
230 | Level3
231 | ProgramDatabase
232 | true
233 | Default
234 | stdcpp17
235 |
236 |
237 | true
238 | Windows
239 | true
240 | true
241 | $(OutDir)$(ProjectName).arm.dll
242 |
243 |
244 | copy ..\ARM\Release\reflective_dll.arm.dll ..\bin\
245 |
246 |
247 |
248 |
249 | X64
250 |
251 |
252 | MaxSpeed
253 | OnlyExplicitInline
254 | true
255 | Size
256 | false
257 | WIN64;NDEBUG;_WINDOWS;_USRDLL;REFLECTIVE_DLL_EXPORTS;WIN_X64;REFLECTIVEDLLINJECTION_VIA_LOADREMOTELIBRARYR;REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN;%(PreprocessorDefinitions)
258 | MultiThreaded
259 | true
260 |
261 | Level3
262 | ProgramDatabase
263 | CompileAsCpp
264 | stdcpp17
265 |
266 |
267 | $(OutDir)$(ProjectName).x64.dll
268 | false
269 | Windows
270 | true
271 | true
272 | MachineX64
273 |
274 |
275 | copy $(OutDir)$(ProjectName).x64.dll ..\bin\
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
--------------------------------------------------------------------------------
/rpcscan/reflective_dll.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 | Source Files
22 |
23 |
24 |
25 |
26 | Header Files
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Header Files
36 |
37 |
38 |
--------------------------------------------------------------------------------
/rpcscan/reflective_dll.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/rpcscan/rpc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JDArmy/RPCSCAN/627ab955d4c97a06b33c56faf31e9843bd19a7fa/rpcscan/rpc.c
--------------------------------------------------------------------------------
/rpcscan/rpc.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma once
3 | #ifndef WIN32_LEAN_AND_MEAN
4 | #define WIN32_LEAN_AND_MEAN
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include