伪造大文件

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main(int argc, char *argv[])
{

    if (argc < 2)
    {
        fprintf(stderr, "usage:\n%s filepath", argv[1]);
        exit(1);
    }
    int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC);
    if (fd < 0)
    {
        perror("open() ");
        exit(1);
    }
    lseek(fd, 5LL * 1024LL * 1024LL * 1024LL, SEEK_SET);
    write(fd, "", 1);

    close(fd);
    exit(0);
}
伪造maps文件是一种绕过Frida检测的方法。通过修改Frida的JavaScript脚本,可以使用Frida的API来伪造maps文件。引用\[3\]中的代码示例展示了如何使用Frida来伪造maps文件。 在这个示例中,通过替换libc.so中的open函数,当检测到pathname中包含"maps"时,会将读取到的maps文件内容写入到一个自定义的文件中,然后将该自定义文件的路径作为参数传递给open函数,从而达到伪造maps文件的目的。 这种方法可以绕过一些基于maps文件的Frida检测机制,因为伪造的maps文件中不会包含Frida相关的路径信息。但需要注意的是,这只是一种绕过检测的方法,并不能完全保证不被检测到。因为Frida的检测机制可能会不断更新,对于新的检测方法可能仍然会被检测到。 总之,伪造maps文件是一种绕过Frida检测的方法,但并不是绝对可靠的方法,使用时需要谨慎。 #### 引用[.reference_title] - *1* [过某交友软件frida反调试](https://blog.csdn.net/weixin_56039202/article/details/125550281)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [frida反调试](https://blog.csdn.net/qq_32445755/article/details/130770249)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值