Hot answers tagged

114

If openssl uses a lot of CPU then it is not blocked waiting for "entropy". OpenSSL is actually sane in that respect, and uses a cryptographically secure PRNG to extend an initial seed into as many bits as it needs. When you use dhparam, OpenSSL not only generates DH parameters; it also wants to assert his social status by taking care to use for the modulus ...


33

The author had made the mistake of being ambiguous and confused the readers a bit. I must admit, like you, I was confused at first, until I saw the PCAP dump. First of all, the box indeed doesn't have wget The attacker didn't use that one echo statement, he used a series of echo statements. I counted about 107 echo statements progressively building the ...


19

I'm the guy who wrote the code which compromises the dvrs, and as said above, there is a script which simply connects and "echo"s the binary into a file, where it can be executed. As we are only echoing the raw bytes into the file and also excluding any new lines (-n), the result is an identical file. You can generate a set of the echo lines yourself by ...


13

Yes and no. Strictly speaking, TrustZone is only a processor feature that provides isolation between tasks via the MMU and the memory bus. You can think of it as a poor man's virtualization: there's just the hypervisor (the TZ secure world) and the regular operating system (the TZ normal world). This architecture allows sensitive data to be manipulated ...


9

Binary exploitation does not require you understand the Linux kernel in depth, unless you are exploiting the kernel itself. You only need to know the basics such as how signal handlers are registered, how syscalls work, and how Linux manages process-specific attributes that can be relevant to exploitation. A solid understanding of Linux is very useful, but ...


6

Why would you need a specific FP ? The saved FP is there to be loaded back into the corresponding register by the vuln() function when it exits; but that function does not access it in any way, so it could have any value. The loading back of FP is for the benefit of whatever code will execute immediately afterwards: normally the caller of vuln() (who wants ...


5

Very precise timing information is very helpful when doing side-channel attacks. Some famous example (in lab conditions) include stealing an encryption key used by some other process, on data we do not see (neither cleartext nor ciphertext). This can work on detection of L1 cache misses, or of jump (mis)prediction in the CPU. Forbidding access to the cycle ...


5

You should look at the BlackHat talk ARM Exploitation ROPmap. In short you can find ROP gadgets with any assembler variant, just the rules are a little different for ARM. Before tools like mona we used objdump and grep!


5

In a nutshell, the TEE does have its own bootloader. The basic idea is that the CPU boots from ROM. This ROM is programmed to load a software image from persistent storage, verify that it is signed by a public key which is stored in the ROM, and transfer the execution to this software image. On an ARM platform with TrustZone, the CPU starts in secure mode, ...


5

I am the author of the post, and indeed, "1" is correct. The easiest way to find all the packets that make up the "wget" upload is the wireshark filter "tcp.stream eq 1" (see link in original article for the pcap). The just "follow TCP stream" and filter the part from 142.0.45.42 to 192.168.1.100. "Save as" (raw) and you got a text file with the content. ...


5

The NX-bit implementation its supported since ARMv6, and yes, linux also has support for it. (NX implementations needs both OS support and CPU support) Now if you want to check the nx bit, you can do it like with any other platform, there's a good old script called checksec.sh from the trapkit team, here you can see the implementation: # check for NX ...


4

Negative rings are false rings. They are not actual privilege levels of the CPU. The way rings work is simple. Some instructions have privilege checks where they verify that the current privilege level, or CPL, is sufficient and if it is not, the instruction fails with a general protection fault. CPL0 is ring 0, CPL1 is ring 1, etc. Some instructions will ...


4

Intel can do register-to-register encryption with the AES instructions and many ARM chips have crypto accelerators with similar functions. There's two kinds of attack here: having an external DRAM bus physically snooped, and having a software exploit that sees the memory from the processor's point of view. The former is actually easiest to deal with by ...


4

The example in the article is just one of many echo statements that are used to progressively build the file. Because it uses the >> redirection operator, it does not clobber the existing contents of the file but appends to it instead. Quoting from the article: Turns out that the attacker appears to use a wrapper script that uses a series of "echo"...


3

If you are having an issue with null bytes, then try to encode the shellcode before using to eliminate the null bytes. I assume you have got metasploit and able to use the encoder. Here is how it works. shell = (" \x77\x... your shellcode") file = open('shellcode.bin','w') file.write(shell) file.close() or you can also use echo -e "shellcode" >> ...


3

"Burning chips with bad firmware." This can result in extremely serious consequences that might even jeopardize lives. There is definition for this type of activity. It is called sabotage and can have very serious legal consequences. You are essentially running a cyber attack on hardware by maliciously inserting corrupted firmware with the sole purpose of ...


3

These processors do not directly support secure key memory, but they do cooperate with an external component known as the Trusted Platform Module, which basically allows you to perform secure cryptographic operations using an unknown key (the component is sealed and will never divulge its key, and is hardened against tampering). UEFI can use this for Secure ...


2

I didn't glance long, but using the 1 + 0x59554 : pop {r0, r1, r2, r6} result from xrop, and the 0x00042d00 : pop {r3, pc} result from ROPgadget, have you tried fitting this in your ROP stack? page += p32(pop_r0_r1_r2_r6_pc) #xrop result with loaded offset page += p32(r0_popval) #r0 - mmap() address in exploit. page += p32(r1_popval) #r1 - size in exploit....


2

Answer: Low-level vulnerabilities, such as buffer overflows in the stagefright binary or underlying Linux kernel, will behave differently on every system that you run them on (ie: x86 Android, QEMU ARM, native ARM). Userland-level security vulnerabilities will be largely the same as they live at a high level of abstraction from the processor architecture.


2

Strictly speaking, you can't do anything with TrustZone itself. TrustZone itself is an isolation feature of the CPU core. It adds another level to isolation between processes: in addition to user/kernel or user/kernel/hypervisor, there's normal-user, normal-kernel, normal-hypervisor, secure-user and secure-kernel. But since normal-kernel mode (or normal-...


2

An excellent tutorial on stack buffer smashing, if you haven't read it already, is Smashing the Stack for Fun and Profit. What you've set up appears to be mostly correct (storing new arguments on stack, finding the stack buffer, injecting the target function address at the location of the saved pc). I think the problem may be with the callee-saved register ...


1

Have the TA's output include a signature of the result of the computation, made with a key that only the TA knows. The signed data needs to include the parameters of the computation as well, not just the result. Otherwise an adversary could take results of one computation and pretend they were the result of a different computation that the TA has also ...


1

I will stay with the intel/x86 architecture for my answer, but it can probably be applied to other vendors/ring-designs. Ring -3 is 'the computer that runs your computer', the management engine on the mainboard. So the next logical step would be to look for a chip on the motherboard that could exercise total control over the system. The only thing I can ...


1

TrustZone and TPM (with its SRK) are two very different things. I'll try to deferenciate both of those before explaining how they can be used to achieve what you explained. TrustZone is an ARM platform environment. It provides a second environment which is meant to be secure. By this I mean, many features are available to obtain security. In your example, ...


1

If you want to have hardware ensure that software is valid before you boot, you would want to use something like a TPM for measured boot. A TPM is meant to be platform-independent, even if it is most commonly seen on x86 systems. This means it can be made to work with a Raspberry Pi. A TPM will measure the bootloader, kernel, and even firmware before it ...


1

To determine if stack-smashing detection has been compiled into the binary, after decompilation with apktool, your shared object libraries as you know can be located in <apktool_outdir>/lib/<arch> cd <lib_dir> for o in $(ls); do echo -e "\n\n$o:" && strings $o | grep stack_chk; done


1

I had the same problem when I needed to generate a .pem for a dovecot upgrade I was doing on a Raspberry pi mailserver that I have kicking around. The command parameters recommended by the dovecot documentation seemed to be taking forever on the RPi, so instead I ran the recommended command on my laptop, a 2.5 GHz Quad-Core Intel Core i7, and it took less ...


1

Check the NS bit in the SCR register (it's the same register on ARMv7 and ARMv8). You need to be in a privileged mode (i.e. EL1 and above). (Monitor mode (EL3) is secure regardless of the value of the NS bit but if you need to ask you aren't running code in monitor mode.) It's a bit odd that you'd need to test that because typically the two worlds would be ...


1

You assumption is wrong. you don't need to use the full 4 byte address of the FP. Since your CPU will understand the thumb mode. as a result your exploit will look like : printf "AAAABBBBCCCC\x94\xac\x8b\xbe\[FP 2 bytes without \x00\x00 here]\x38\x84"


Only top voted, non community-wiki answers of a minimum length are eligible