@@ -393,7 +393,6 @@ struct VM {
393393 HYPERV_CPUID,
394394 CUCKOO_DIR,
395395 CUCKOO_PIPE,
396- USB_DRIVE,
397396 HYPERV_HOSTNAME,
398397 GENERAL_HOSTNAME,
399398 SCREEN_RESOLUTION,
@@ -7609,34 +7608,6 @@ struct VM {
76097608 }
76107609
76117610
7612- /* *
7613- * @brief Check for presence of USB drive
7614- * @category Windows
7615- * @author Thomas Roccia (fr0gger)
7616- * @link https://unprotect.it/technique/detecting-usb-drive/
7617- * @copyright MIT
7618- */
7619- [[nodiscard]] static bool usb_drive () try {
7620- #if (!MSVC)
7621- return false ;
7622- #else
7623- UINT drives = GetLogicalDrives ();
7624-
7625- for (int i = 0 ; i < 26 ; i++) {
7626- if ((drives & (1 << i)) && GetDriveTypeA ((char )(' A' + i) + " :\\ " ) == DRIVE_REMOVABLE) {
7627- debug (" USB drive detected: " , ' A' + i, " , returning false" );
7628- return false ;
7629- }
7630- }
7631-
7632- // at this point, no drives have been detected
7633- return true ;
7634- #endif
7635- }
7636- catch (...) {
7637- debug (" USB_DRIVE: caught error, returned false" );
7638- return false ;
7639- }
76407611
76417612
76427613 /* *
@@ -8800,7 +8771,6 @@ const std::map<VM::u8, VM::core::technique> VM::core::technique_table = {
88008771 { VM::HYPERV_CPUID, { 35 , VM::hyperv_cpuid }},
88018772 { VM::CUCKOO_DIR, { 15 , VM::cuckoo_dir }},
88028773 { VM::CUCKOO_PIPE, { 20 , VM::cuckoo_pipe }},
8803- { VM::USB_DRIVE, { 30 , VM::usb_drive }},
88048774 { VM::HYPERV_HOSTNAME, { 50 , VM::hyperv_hostname }},
88058775 { VM::GENERAL_HOSTNAME, { 20 , VM::general_hostname }},
88068776 { VM::SCREEN_RESOLUTION, { 30 , VM::screen_resolution }},
@@ -8809,4 +8779,4 @@ const std::map<VM::u8, VM::core::technique> VM::core::technique_table = {
88098779 // __TABLE_LABEL, add your technique above
88108780 // { VM::FUNCTION, { POINTS, FUNCTION_POINTER }}
88118781 // ^ template
8812- };
8782+ };
0 commit comments