qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.11k stars 742 forks source link

使用qiling的过程中发现ql_syscall_ipc未实现的问题 #1346

Open readermall opened 1 year ago

readermall commented 1 year ago

我在使用qiling运行trendnet的固件中的web守护程序goahead时,发现以下报错: syscall ql_syscall_ipc number = 0x1015(4117) not implemented 调试发现是因为goahead程序调用了msgget函数导致的错误。进一步分析qiling代码,发现qiling未实现Linux ipc有关的系统调用,包括共享内存、消息队列等内容。

我看到有不少Issues反馈了这个问题,是否有开发者愿意实现,我可以协助测试。

chinggg commented 1 year ago

请问 https://github.com/qilingframework/qiling/commit/e76b8ab95e1c66178dd5cc3d8c2d1cffb61a0233 中的 ql_syscall_ipc 部分实现是否满足了你的需求?否则我可以尝试实现

readermall commented 1 year ago

谢谢你的回答,e76b8ab 没有实现我需要的功能,e76b8ab 只涉及了 ipc 中的 shm(共享内存) 部分,没有涉及 msg(消息队列) 部分。所以还不能满足我的需求。

如果您可以实现,我将继续我之前跑的测试用例,以配合测试,期待您的回复,再次感谢。

ireading @.***

 

------------------ 原始邮件 ------------------ 发件人: "qilingframework/qiling" @.>; 发送时间: 2023年5月29日(星期一) 下午2:15 @.>; @.**@.>; 主题: Re: [qilingframework/qiling] 使用qiling的过程中发现ql_syscall_ipc未实现的问题 (Issue #1346)

请问 e76b8ab 中的 ql_syscall_ipc 部分实现是否满足了你的需求?否则我可以尝试实现

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

chinggg commented 1 year ago

@readermall I just implemented msgget, msgsnd and msgrcv syscalls and tested their basic functionality using the example in man page. You can try the latest code in PR #1363 and see if it works as expected.

readermall commented 1 year ago

@chinggg 谢谢你,我会尽快尝试相关功能,期待你的工作被早日加入主分支

readermall commented 1 year ago

@chinggg 你写的代码我还没法测全,因为我用的测试用例会报其他的错误。目前只能得出结论,msgget部分可以正常工作。

[+]     created a new msg queue: key = 0x270f, mode = 0666. assigned id: 0xf000000
[+]     0x9004195c: ipc(call = 0xd, first = 0x270f, second = 0x3b6, third = 0x0, ptr = 0x0, fifth = 0x0) = 0xf000000
[+] hit breakpoint at 0x00443fd4
chinggg commented 1 year ago

@readermall 你运行的trendnet的固件中的web守护程序goahead是可公开获取的吗?我可考虑自行测试

readermall commented 1 year ago

@chinggg 是可以公开获取的,版本是 tew-637ap_v2(fw1.3.0.106)