Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

代码审计 企业级Web代码安全架构 可惜php 没那么熟了,正好从逆向角度复习 php虚拟机

 Share


HACK1949

Recommended Posts

 

忘了哪本书里说,研究信息系统的安全问题,要对系统获得比开发人员更深的理解,深以为然

 

php虚拟机    <深入理解PHP内核>

这书当年就没咋看懂。。。

https://www.shouce.ren/api/view/a/14924

 

print语句 创建一条zend_op,将返回值的类型设置为临时变量(IS_TMP_VAR),并为临时变量申请空间,随后指定opcode为ZEND_PRINT,并将传递进来的参数赋值给这条opcode的第一个操作数。这样在最终执行这条opcode的时候,Zend引擎能获取到足够的信息以便输出内容。

echo处理除了指定opcode以外,还将echo的参数传递给op1,这里并没有设置opcode的result结果字段。从这里我们也能看出print和echo的区别来,print有返回值,而echo没有,这里的没有和返回null是不同的,如果尝试将echo的值赋值给某个变量或者传递给函数都会出现语法错误。

PHP脚本编译为opcode保存在op_array中

op_array  的作用域是啥?????

 

execute函数执行:
ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)

PHP开始执行以后会经过两个主要的阶段:处理请求之前的开始阶段和请求之后的结束阶段。开

 938614-20220823141322991-1124976150.png

 

 

 

PHP内核中的哈希表是十分重要的数据结构,PHP的大部分的语言特性都是基于哈希表实现的,例如:变量的作用域、函数表、类的属性、方法等,Zend引擎内部的很多数据都是保存在哈希表中的。


https://www.php.cn/php-ask-477686.html
windows环境下如何给php安装vld扩展

http://pecl.php.net/package/vld/0.12.0/windows

php -dvld.active=1 a.php

938614-20220823150014772-713040442.png

 

 

数组

938614-20220823150548509-1118755253.png

 

 

全局变量

938614-20220823150743513-924267589.png

 

 彻底看不懂了

938614-20220823151415889-1129136064.png

 

 

异常处理怎么可以这样

938614-20220823151954684-170973702.png

 

Link to post
Link to comment
Share on other sites

 Share

discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...