diff --git a/CDIR/CDIR.cpp b/CDIR/CDIR.cpp index 576f8c7..8d5dcbc 100644 --- a/CDIR/CDIR.cpp +++ b/CDIR/CDIR.cpp @@ -76,7 +76,8 @@ param_prefdump = true, param_regdump = true, param_webdump = true, param_wmidump = true, -param_srumdump = true; +param_srumdump = true, +param_swapdump = true; string param_output; @@ -744,6 +745,8 @@ int get_analysisdata(ostringstream *osslog = NULL) { // collect somefiles // order of collection + // pagefile.sys + // swapfile.sys // $MFT // $SECURE // $UsnJrnl:$J (skip beginning sparse data) @@ -764,7 +767,6 @@ int get_analysisdata(ostringstream *osslog = NULL) { // * History // * C:\Users\[user]\AppData\Local\Microsoft\Windows\WebCache\ // - // pagefile.sys PVOID oldval = NULL; Wow64DisableWow64FsRedirection(&oldval); @@ -774,6 +776,29 @@ int get_analysisdata(ostringstream *osslog = NULL) { char srcpath[MAX_PATH + 1]; char dstpath[MAX_PATH + 1]; + if (param_swapdump == true) { + + sprintf(srcpath, "%s\\pagefile.sys", osvolume); + sprintf(dstpath, "pagefile.sys"); + + if (!StealthGetFile(srcpath, dstpath, osslog, false)) { + cerr << msg("ページファイル 取得完了 ", "Pagefile was saved ") << srcpath << endl; + } + else { + cerr << msg("ページファイル 取得失敗 ", "failed to save pagefile ") << srcpath << endl; + } + + sprintf(srcpath, "%s\\swapfile.sys", osvolume); + sprintf(dstpath, "swapfile.sys"); + + if (!StealthGetFile(srcpath, dstpath, osslog, false)) { + cerr << msg("ページファイル (UWP用) 取得完了 ", "Pagefile for UWP was saved ") << srcpath << endl; + } + else { + cerr << msg("ページファイル (UWP用) 取得失敗 ", "failed to save pagefile for UWP ") << srcpath << endl; + } + } + if (param_mftdump || param_securedump || param_usndump) { mkdir("NTFS"); } @@ -1271,7 +1296,8 @@ int main(int argc, char **argv) {{"Registry", "レジストリ", "Registry"}, ¶m_regdump}, {{"WMI", "WMI", "WMI"}, ¶m_wmidump}, {{"SRUM", "SRUM", "SRUM" }, ¶m_srumdump}, - {{"Web", "ブラウザ", "Web"}, ¶m_webdump} + {{"Web", "ブラウザ", "Web"}, ¶m_webdump}, + {{"Swap", "スワップファイル", "Swap"}, ¶m_swapdump} }; for (size_t i = 0; i < params.size(); i++) { diff --git a/CDIR/ConfigParser.h b/CDIR/ConfigParser.h index 51e1228..97b0dc0 100644 --- a/CDIR/ConfigParser.h +++ b/CDIR/ConfigParser.h @@ -31,6 +31,7 @@ struct c_ignorecase:std::binary_function { static map CONFIGLIST = { {"MemoryDump", TYPE_BOOL}, + {"Swap", TYPE_BOOL}, {"MFT", TYPE_BOOL}, {"Secure", TYPE_BOOL}, {"UsnJrnl", TYPE_BOOL}, diff --git a/CDIR/cdir.ini b/CDIR/cdir.ini index bf62011..1214c25 100644 --- a/CDIR/cdir.ini +++ b/CDIR/cdir.ini @@ -8,7 +8,10 @@ Registry = true WMI = true SRUM = true Web = true +Swap = true ;Target = G:\ +MemoryDumpCmdline = winpmem_mini_x64_rc2.exe physmem.raw +;MemoryDumpCmdline = winpmem_mini_x86.exe physmem.raw ;MemoryDumpCmdline = winpmem-2.1.post4.exe --output RAM.aff4 ;MemoryDumpCmdline = DumpIt.exe /Q /N /T DMP /O RAM.dmp ;MemoryDumpCmdline = RamCapture64.exe RAM.raw diff --git a/CDIR/winpmem_mini_x64_rc2.exe b/CDIR/winpmem_mini_x64_rc2.exe new file mode 100644 index 0000000..7b972a8 Binary files /dev/null and b/CDIR/winpmem_mini_x64_rc2.exe differ diff --git a/CDIR/winpmem_mini_x86.exe b/CDIR/winpmem_mini_x86.exe new file mode 100644 index 0000000..9f99735 Binary files /dev/null and b/CDIR/winpmem_mini_x86.exe differ