【问题标题】:winexe error when executed from webserver with php使用php从网络服务器执行时出现winexe错误
【发布时间】:2023-03-14 03:16:01
【问题描述】:

我已经从包'winexe_4.13.0.1-1_amd64.deb'安装了winexe(我从https://software.opensuse.org/download/package?package=winexe&project=home%3Auibmz%3Aopsi%3A4.1%3Aexperimental获得)

所以,我的winexe是:

$ winexe -V
winexe version 4.13

winexe 从命令行调用时执行良好,例如:

/usr/bin/winexe -U Administrador%xxxx //192.168.2.99 systeminfo

我想从 apache 提供的 php 脚本执行 winexe 命令,所以我有 libapache2-mod-php8.0 链接的 php8.0.10 和 apache 2.4.1

出于这个原因,我有一个 php 脚本,它使用 system() 和/或 exec() 和/或 shell_exec() 函数从上面执行命令,我得到了错误 但是当我从网页(即,我连接到'https ://...) 我得到错误:

...
...
Bind RPC Pipe: host 192.168.2.99 auth_type 0, auth_level 1
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 52
check_bind_response: accepted!
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 32
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 32
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 40
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 32
rpc_api_pipe: host 192.168.2.99
rpc_read_send: data_to_read: 32
samba_tevent: EPOLL_CTL_ADD failed (Operation not permitted) replay[0] - calling panic_fallback
main: cli_ctrl failed: NT_STATUS_CONNECTION_DISCONNECTED

注意。我试过在前面加上'cat

欢迎任何帮助,提前谢谢你,

g

【问题讨论】:

    标签: php linux samba winexe


    【解决方案1】:

    最后,我放弃了winexe,而是使用impacket package 中的atexec.py,它就像一个魅力

    【讨论】:

    • 我也有类似的问题,我用普通用户执行了winexe程序没有问题,但是当将它docker化并以root用户身份运行时,它得到了确切的错误......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多