设为首页收藏本站
查看: 7563|回复: 1

[交流] 检测浏览器

[复制链接]
  • TA的每日心情
    开心
    2023-9-4 15:59
  • 签到天数: 445 天

    [LV.9]以坛为家II

    发表于 2022-6-30 23:15:42 | 显示全部楼层 |阅读模式
    1. bool chrome_history_evasion(int min_websites_visited = 10)
    2. {
    3.   sqlite3 *db;
    4.   int rc;
    5.   bool vm_found = false;

    6.   rc = sqlite3_open("C:\\Users\\<USER_NAME>\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\History", &db);
    7.   if (!rc)
    8.   {
    9.     char **results = nullptr;
    10.     char *error = nullptr;
    11.     int rows, columns;

    12.     rc = sqlite3_get_table(db, "SELECT DISTINCT title FROM urls;", &results, &rows, &columns, &error);
    13.     if (!rc)
    14.       vm_found = rows < min_websites_visited;
    15.     sqlite3_free_table(results);
    16.   }

    17.   sqlite3_close(db);
    18.   return vm_found;
    19. }
    复制代码

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?注册

    x
  • TA的每日心情
    开心
    2023-9-4 15:59
  • 签到天数: 445 天

    [LV.9]以坛为家II

     楼主| 发表于 2022-7-1 00:17:39 | 显示全部楼层
    1. int pafish_exists_file(char * filename) {
    2.     DWORD res = INVALID_FILE_ATTRIBUTES;
    3.     if (pafish_iswow64() == TRUE) {
    4.         void *old = NULL;
    5.         // Disable redirection immediately prior to calling GetFileAttributes.
    6.         if (pafish_disable_wow64_fs_redirection(&old) ) {
    7.             res = GetFileAttributes(filename);
    8.             // Ignoring MSDN recommendation of exiting if this call fails.
    9.             pafish_revert_wow64_fs_redirection(old);
    10.         }
    11.     }
    12.     else {
    13.         res = GetFileAttributes(filename);
    14.     }
    15.     return (res != INVALID_FILE_ATTRIBUTES) ? TRUE : FALSE;
    16. }

    17. int gensandbox_common_names() {
    18.     DWORD dwSize = MAX_PATH;
    19.     char szLogicalDrives[MAX_PATH] = {0};
    20.     DWORD dwResult = GetLogicalDriveStrings(dwSize,szLogicalDrives);
    21.     BOOL exists;

    22.     if (dwResult > 0 && dwResult <= MAX_PATH)
    23.     {
    24.         char* szSingleDrive = szLogicalDrives;
    25.         char filename[MAX_PATH] = {0};
    26.         while(*szSingleDrive)
    27.         {
    28.             if (GetDriveType(szSingleDrive) != DRIVE_REMOVABLE ) {
    29.                 snprintf(filename, MAX_PATH, "%ssample.exe",szSingleDrive);
    30.                 exists = pafish_exists_file(filename);
    31.                 if (exists) return TRUE;
    32.                
    33.                 snprintf(filename, MAX_PATH, "%smalware.exe",szSingleDrive);
    34.                 exists = pafish_exists_file(filename);
    35.                 if (exists) return TRUE;
    36.             }

    37.             szSingleDrive += strlen(szSingleDrive) + 1;
    38.         }
    39.     }

    40.     return FALSE;
    41. }
    复制代码
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    红盟社区--红客联盟 

    Processed in 0.057772 second(s), 24 queries.

    站点统计| 举报| Archiver| 手机版| 黑屋 |   

    备案号:冀ICP备20006029号-1 Powered by HUC © 2001-2021 Comsenz Inc.

    手机扫我进入移动触屏客户端

    关注我们可获取更多热点资讯

    Honor accompaniments. theme macfee

    快速回复 返回顶部 返回列表