1 |
when perl is executed as interpretation (perl mynastyscript) it |
2 |
changes his role to perl_role |
3 |
|
4 |
perl role has only the rights to open scripts marked as trusted, if |
5 |
the script is trusted, read is permitted and a change of role happens |
6 |
to user role is done. If it's not trusted, then perl can only do what |
7 |
perl_r do (mapping standard libraries), perl_r can map libperl.so, it |
8 |
can write the code this library permits. He shall rewrite the wheel |
9 |
too many times. |
10 |
|
11 |
Maybe I could make checks forbidding this library mapping and granting |
12 |
only when transition is done (so when is clear that the script is |
13 |
trusted). I shall check it. |
14 |
|
15 |
|
16 |
2011/12/14 Alex Efros <powerman@××××××××.name>: |
17 |
> Hi! |
18 |
> |
19 |
> On Wed, Dec 14, 2011 at 04:27:45PM +0100, Javier Juan Martínez Cabezón wrote: |
20 |
>> I told you, with a secure TPE (so scripts fully controlled) tell me |
21 |
>> how to write one kernel exploit under bash without calling external |
22 |
>> code. |
23 |
> |
24 |
> How about |
25 |
> $ perl -e 'exploit code here' |
26 |
> or just |
27 |
> $ perl |
28 |
> exploit code here from stdin |
29 |
> Ctrl-D |
30 |
> ? |
31 |
> Is your current RBAC configuration prevent this? |
32 |
> |
33 |
> As for me, I tend to agree with you about RBAC, but I think to make RBAC |
34 |
> really useful it rules/roles must be provided by software developers - |
35 |
> just like they now provide README and Makefile, because only software |
36 |
> authors actually know which files, devices and syscalls used by their |
37 |
> applications and how these requirements change from version to version. |
38 |
> |
39 |
> I've tried different RBAC implementations few times, but got tired fixing |
40 |
> roles and rules - on usual hardened workstation after enabling RBAC (even |
41 |
> after auto-learning mode) everything become broken in many unexpected |
42 |
> ways, and it took too many time to realize each time this isn't a bug in |
43 |
> some software but just RBAC misconfiguration and fixing it. Probably |
44 |
> workstation isn't good place for RBAC. But on most of my servers there are |
45 |
> a lot of perl scripts, and we often add new scripts, and writing RBAC |
46 |
> rules for all of them looks too complicated. Another server must have php, |
47 |
> ftp, many wordpress sites and other php crap - and I can't even imagine |
48 |
> how this can be secured using RBAC. |
49 |
> |
50 |
> BTW, while I agree with you about useless 'noexec' for /tmp, it's usually |
51 |
> cheap way to stop few scriptkiddies with default exploits, so there is no |
52 |
> harm in using it. And no real harm in don't using it. |
53 |
> |
54 |
> -- |
55 |
> WBR, Alex. |
56 |
> |