vrasneur / randkit Goto Github PK
View Code? Open in Web Editor NEWRandom number rootkit for the Linux kernel
License: GNU General Public License v3.0
Random number rootkit for the Linux kernel
License: GNU General Public License v3.0
In normal /dev/random I see this :
root@system ~> head -c200 /dev/urandom | hexdump
0000000 712d 53c2 690c 1e43 ede6 db4a bc81 dff7
0000010 c3c5 569e 93dc 22bc c0af 8c82 848d c62e
0000020 d7ec 379c e214 cb97 5b5e 6897 5bb2 ac72
0000030 303d 9545 12d7 4dbf 3667 f774 432f f31a
0000040 bfa9 a4fa d3d6 7625 25e9 97c6 1769 af17
0000050 df94 1b1e 4cdf a46a bd14 45e1 85ff 29e8
0000060 c501 ebd1 bd51 bd13 610f 0760 b037 8b2c
0000070 00de 25aa 8c5f 5320 ff96 62f9 2d9c af2b
0000080 065d a70b 88f9 a077 476c 3bb0 c84c 42f9
0000090 7256 1380 6bc4 66ec eaac ac0b 9e5d 8afa
00000a0 6ae9 aa52 08a2 4742 75a6 2fcc 6ede d2ce
00000b0 0238 2450 4cc2 aa43 a7d9 754e a114 7f18
00000c0 0fd1 ad6f a904 4695
00000c8
after I enable the zero rootkit my hex output is incomplete :
root@system ~> head -c200 /dev/urandom | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
00000c8
I can't cat /dev/urandom
and cat /dev/random
but for xor and other it is worked.
also when activate the zero module, chrome and some programs (i.e: visual studio code) crashes :))
I want to know why when use the same pattern for entropy pool, /dev/random doesn't work correctly ?
and how to fix it ?
I changed this code :
static u32 rk_xor128(void) {
unsigned long flags;
u32 t;
spin_lock_irqsave(&rk_spinlock, flags);
t = rk_state.x ^ (rk_state.x << 11);
rk_state.x = rk_state.y;
rk_state.y = rk_state.z;
rk_state.z = rk_state.w;
rk_state.w = (rk_state.w ^ (rk_state.w >> 19)) ^ (t ^ (t >> 8));
spin_unlock_irqrestore(&rk_spinlock, flags);
return rk_state.w;
}
to this one :
static u32 rk_xor128(void) {
return 1;
}
the second one cause hanging when cat /dev/random
what is the problem for same sequences ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.