Gentoo Archives: gentoo-hardened

From: "Tóth Attila" <atoth@××××××××××.hu>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Tool for eliminating non used code or symbols?
Date: Tue, 26 Mar 2013 18:45:53
Message-Id: bb3f9c67af6ed3b299a6b370e7bfa351.squirrel@atoth.sote.hu
In Reply to: Re: [gentoo-hardened] Tool for eliminating non used code or symbols? by "Javier Juan Martínez Cabezón"
1 2013.Március 26.(K) 16:56 időpontban Javier Juan Martínez Cabezón ezt írta:
2 > On 26/03/13 16:45, Javier Juan Martínez Cabezón wrote:
3 >> On 26/03/13 16:11, "Tóth Attila" wrote:
4 >>
5 >>>
6 >>> I wonder how these ROP techniques can theoretically perform in a
7 >>> java virtual machine? What are the possbile target vectors for
8 >>> Python or Ruby? What about JIT code?
9 >>
10 >> http://www.grant-olson.net/python/pyasm
11 > I'm not sure if I understood you wrongly, do you want mean how can
12 > someone do ROP in python? or how a python script could be objetive of a
13 > ROP attack?
14
15 I ment: how to do ROP in python and how a compiled python script can be an
16 objective of a ROP attack? If the attacker carefuly studies the way how
17 exactly the script becomes executable code in memory, it gains control on
18 a mechanism to plant the necessary pre-designed snippets needed for the
19 actual exploit.
20 We saw the exploit hardening software of the guy in the presentation
21 video. If they can succesfully analyse given language like java or python,
22 they could find a way to pre-create the code fragments they need. There
23 could be an additional phase for designing and implanting these. If the
24 runtime environment has a flaw, they may gain full or partial control over
25 the location as well. So that means less probing would be necessary and
26 the mechanism would be much faster.
27
28 > Python is linked against libc too, and finally it finish being executed
29 > in machine (assembler) code, the main difference is that C for example
30 > needs compilation, python scripts "are compiled" on the fly.
31
32 I could also mention other languages, like python. Those who deal with
33 scripts or partially compiled interim formats. I don't have internal
34 information about these. But I suspect that address randomization of the
35 run-time generated code was not considered as a focus of interest. There
36 can be numerous weaknesses (even by design) in such languages. If the
37 attacker figures out the way to get through the execution process, there
38 will be endless victims out there to exploit.
39
40 I'm not a professional computer scientist, so I'm sorry if I use some tech
41 words inappropriately.
42 --
43 dr Tóth Attila, Radiológus, 06-20-825-8057
44 Attila Toth MD, Radiologist, +36-20-825-8057

Replies

Subject Author
Re: [gentoo-hardened] Tool for eliminating non used code or symbols? Pavel Labushev <pavel.labushev@××××××.no>