Commit Graph

183 Commits (bae365b02c22fe6da2b8c51d28e533afb6f0ccd7)

Author SHA1 Message Date
Pawel Kurowski bae365b02c Ensure existence of required channel constructor (only MSVC)
Declaring constructor = default was allowing aggressive optimization.
Compiler would skip both channel registration, and static asserts.
2020-02-28 10:59:23 +01:00
Grzegorz Rychlik 91dc3a1163 Update zlib to 1.2.11-f690224aeb (from vcpkg) 2020-02-27 10:28:12 +01:00
Grzegorz Rychlik 2e27198936 Update build script 2020-02-25 14:25:13 +01:00
Grzegorz Rychlik 088d2d47b0 Downgrade ResourceGenerator to dotnet 2.1 (LTS) to match WebController 2020-02-24 16:12:52 +01:00
Grzegorz Rychlik 66c671c169 Merge branch 'CovenantIntegrationMerge' into RC1.1 2020-02-24 16:01:39 +01:00
Grzegorz Rychlik f9122902bd Remove artifact from Common.vcxitems.filters 2020-02-24 12:50:24 +00:00
tim.carrington 6a7f726f35 Merge branch 'CovenantIntegrationMerge' of git.f-secure.com:C3/C3 into CovenantIntegrationMerge 2020-02-21 09:51:38 +00:00
tim.carrington f9018412be update listening address for use with c2-bridge 2020-02-21 09:50:55 +00:00
Grzegorz Rychlik 727ee98f50 Merge branch 'Shellcode' into RC1.1 2020-02-19 15:20:02 +01:00
Grzegorz Rychlik 471ea7cc7a Add detailed help to channel linter 2020-02-19 15:04:37 +01:00
Grzegorz Rychlik e0b253f6aa Improve capability parsing error messages and add command execution logging 2020-02-19 12:14:46 +01:00
Grzegorz Rychlik a658af4e70 Better channel IO testing 2020-02-19 09:59:07 +01:00
Grzegorz Rychlik 22b15fc6e1 Better error message for missing form properties 2020-02-18 16:09:28 +01:00
Grzegorz Rychlik 3e9ca203c4 Add better error message for case typos 2020-02-18 15:54:09 +01:00
Grzegorz Rychlik a57c7b8559 Wipe DOS and NT heades after loading 2020-02-18 14:15:57 +01:00
Grzegorz Rychlik ec9a6cba21 Enable inline function expanstion for rwdi x86 2020-02-18 14:13:20 +01:00
Grzegorz Rychlik c7a18cec0d Merge branch 'Dotnet2.1' 2020-02-18 13:54:05 +01:00
Pawel Kurowski 3eb69d9780 Fix crash on shared_from_this 2020-02-07 17:37:32 +01:00
Grzegorz Rychlik 2262bf8f71 Downgrade WebController target framework to 2.1 2020-01-30 12:36:03 +01:00
Grzegorz Rychlik af219394af Detour GetModuleHandleExW function in x86
vcruntime dispatches tasks to Windows thread pool. When task finishes
the completion callback is invoked. In order to ensure the dll that
contais that callback code is still loaded, the refcount for the dll is
incremented (via GetModuleHandleExW) when task is scheduled, and
decremented (vie FreeLibrary) after callback finishes.

FreeLibrary called with a handle to unregistered module returns an
error, which is converted into unhandled exception and resulting in
crash.
2020-01-29 15:17:55 +01:00
Grzegorz Rychlik ba5617a5e1 Exclude RtlPcToFileHeader hook from x86 builds
Exception info on x86 is absolute rather than relative (as x64) so
exception creation doesn't require this call.

Additionally Win8.1 SDK doesn't export `RtlPcToFileHeader` in
kernel32.lib for static linking, which causes linking to fail
2020-01-28 10:50:25 +01:00
Grzegorz Rychlik f0e7ece23d Hook RtlPcToFileHeader function
RtlPcToFileHeader is called when throwing exceptions, and creating
std::exception_ptrs.
Insert hook as import function address, not actual ntdll hook.
2020-01-27 17:07:29 +01:00
Grzegorz Rychlik 1775a3980a Move Loader to separate file 2020-01-27 16:22:29 +01:00
Grzegorz Rychlik 820467f83b Separarte PE image utils 2020-01-27 15:55:11 +01:00
Andras Toth 2f3052a5c1 yarn build 2020-01-23 10:48:43 +00:00
Andras Toth 3ce4693570 Enable EDIT CONFIG on create gateway 2020-01-23 10:45:39 +00:00
Grzegorz Rychlik 8df9c1f62a Update Donut runtime libs 2020-01-22 13:30:15 +01:00
Grzegorz Rychlik e136b04b03 [UI][donut] yarn build 2020-01-21 12:47:53 +01:00
Grzegorz Rychlik ca9b5b24b2 [UI][Donut] Add aPLib to donut options 2020-01-21 12:39:10 +01:00
Grzegorz Rychlik ca7c5efba0 [WebController][Donut] Add aPLib compression 2020-01-21 12:19:13 +01:00
tim.carrington f8fc919b61 Fix socket error on peripheral close 2020-01-20 10:22:25 +00:00
tim.carrington 94bc1b9d16 Removal of redundant listenerId code 2020-01-17 16:13:24 +00:00
Grzegorz Rychlik 596c107e8e Remove RVA macro 2020-01-17 16:38:41 +01:00
Grzegorz Rychlik 7ff0c13f45 Update dev notes 2020-01-17 16:33:32 +01:00
Grzegorz Rychlik 5b265ebcaa Update License files 2020-01-17 16:32:54 +01:00
Grzegorz Rychlik 15102cbb66 Add CebuLoader's dev notes 2020-01-17 15:25:55 +01:00
tim.carrington 7cf2e0671f Attempt 3 ;) 2020-01-17 13:30:24 +00:00
tim.carrington aea013bb95 missed UpdateListenerId edit 2020-01-17 13:23:07 +00:00
Grzegorz Rychlik 41b16a3c32 Fix not-null terminated section names 2020-01-17 14:02:38 +01:00
tim.carrington ac52b22c05 removal of redundant else statements and change GetListenerId to UpdateListenerId 2020-01-17 12:53:54 +00:00
tim.carrington 3576a1631b update 2020-01-17 11:48:06 +00:00
tim.carrington 86244b322d update in response to merge comments. Covenant connector now looks for C3Bridge listener before creating one. User now only supplies listener port, url, username and password 2020-01-16 16:40:45 +00:00
Grzegorz Rychlik fb849016ea Fix pre-build command for paths with spaces 2020-01-16 16:40:12 +01:00
Grzegorz Rychlik 911a8d4a97 Replace abort with QuietAbort 2020-01-16 14:38:30 +01:00
Grzegorz Rychlik e56118514d Merge branch 'WebControllerCheckCppRedist' into 'master'
Load libsodium at startup

See merge request C3/C3!155
2020-01-16 10:36:58 +00:00
Grzegorz Rychlik acce0ddf1b Merge branch 'ShareFileLock' into 'master'
Use lock file in UncShareFile channel to avoid rename-read races

See merge request C3/C3!153
2020-01-16 10:34:39 +00:00
Grzegorz Rychlik a88597cac9 [Loader] Update unexported win api for W7 and 8
- Win7's wow64 ntdll sections are aligned to 64k which leaves empty
pages (reserved but inaccessible)
- Update calling convetions, and offset data
2020-01-15 18:49:01 +01:00
Pawel Kurowski 6a7598c814 Use Compression in Covenant.cpp 2020-01-14 17:45:23 +01:00
Pawel Kurowski 8ae59871a8 Merge branch 'zlib' into CovenantIntegrationMerge 2020-01-14 17:42:33 +01:00
Pawel Kurowski 45a8bf9589 Use raw deflate format in Compression.cpp for C# DeflateStream compatibility 2020-01-14 17:40:30 +01:00