// ELF Hash Function 2 unsigned int ELFHash(char *str) 3 { 4 unsigned int hash = 0; 5 unsigned int x = 0; 6 7 while (*str) 8 { 9 hash = (hash << 4) + (*str++);//hash左移4位,把当前字符ASCII存入hash低四位。 10 if ((x = hash & 0xF0000000L) != 0) 11 { 12 /...
// ELF Hash Function unsigned int ELFHash(char *str) { unsigned int hash = 0; unsigned int x = 0; while (*str) { hash = (hash << 4) + (*str++);//hash左移4位,把当前字符ASCII存入hash低四位。 if ((x = hash & 0xF0000000L) != 0) { //如果最高的四位不为0,则说明字符...
ELFhash函数 //ELFhash函数int hasher(char *k){ unsigned long h=0,g; while(*k){ h=(h<<4)+*k++; g=h &0xf0000000l; //7个0; if(g) h^=g>>24; h&=~g; } return h;} 附测试:经典字符串Hash函数测试 1-8-22 上午 11:50:37 1 概述 链表查找...
对真正的恶意软件使用telfhash 如果telfhash不能与真正的恶意软件一起工作,所有这些努力都将是徒劳的。因此,我们使用telfhash尝试分析一些恶意软件样本,例如XorDDoS后门,如图10所示。 我还收集了影响在Linux上运行的设备的IoT僵尸网络Momentum的样本,并对它们运行telfhash,如图11所示。 通过使用telfhash和TLSH距离度量...
public long ELFHash(String str) { long hash = 0; long x = 0; for(int i = 0; i < str.length(); i++) { hash = (hash << 4) + str.charAt(i); if((x = hash & 0xF0000000L) != 0) { hash ^= (x >> 24); } hash &= ~x; } return hash; } ...
字符串哈希函数ELFHash的理解 unsigned long ElfHash ( const unsigned char *name ) { unsigned long h = 0, g; while ( *name ) { h = ( h << 4 ) + *name++; if ( g = h & 0xF0000000 )//如果最高位不为0,则说明字符已经7个,如果不处理,再加第八个字符时,第一个字符会被移出...
不太了解hash算法,ELFHash算法每次都最多返回8位的数值是吗?重复数字的概率大不大?源码:long hash = 0;long x = 0;for(int i = 0; i < str.length(); i++){ hash = (hash << 4) + str.charAt(i); if((x = hash & 0xF0000000L) != 0){hash...
一般是为了保证文件的正确性,防止一些人盗用程序,加些木马或者篡改版权,设计的一套验证系统。
elfhash elfhash is a utility to manipulate hash table of ELF file. #Features: 0, Architecture indepent, That means you can handle 32bit arm ELF in x86/x86_64 platform. 1, Convert GNU style hashtable in ELF to sysV style. 2, Rebuild sysv hashtable, if you change ELF dynamic symbols ...
研究人员使用telfhash分析了真实的恶意软件样本,如XorDDoS后门和影响Linux设备的IoT僵尸网络Momentum的样本。通过使用telfhash和TLSH距离度量(阈值设置为50),研究人员成功地将Momentum僵尸网络样本聚类为三个相似的组。telfhash目前支持x86、x86-64、ARM和MIPS架构,并作为Python库提供,以便轻松集成到...