{"id":61,"date":"2014-12-15T07:01:33","date_gmt":"2014-12-14T18:01:33","guid":{"rendered":"http:\/\/micro.muppetz.com\/blog\/?p=61"},"modified":"2015-01-28T14:00:30","modified_gmt":"2015-01-28T01:00:30","slug":"grsecurity-rbac-system","status":"publish","type":"post","link":"https:\/\/micro.muppetz.com\/blog\/2014\/12\/15\/grsecurity-rbac-system\/","title":{"rendered":"grsecurity RBAC system"},"content":{"rendered":"<p>A few notes I wrote down about enabling the (very intense) grsecuriy RBAC system on micro.<\/p>\n<ol>\n<li>If you have role_allow_ip defined and you try and &#8220;do something&#8221; from an IP not in that allowed list &#8211; you&#8217;ll end up in the default role. \u00a0That can be hard to figure out at first, you know you have a role setup for the user, but you&#8217;re not ending up in it. \u00a0That&#8217;s why.<\/li>\n<li>A subject in a less specific policy with an &#8220;i&#8221; will override a more specific subject.i.e.This &#8220;\/&#8221; subject:subject \/ o { \u00a0 \u00a0\/bin \u00a0 \u00a0 \u00a0 \u00a0rxi}will win over this:subject \/bin\/bash o {}\/bin\/bash will use the polices from the first subject, not the second.<\/li>\n<li>To be able to unlink (delete!) a file, you need both d and the w subject flags. \u00a0d alone isn&#8217;t enough.<\/li>\n<li>Be VERY careful with the C subject flag. \u00a0It will kill everything with the same IP address, silently. \u00a0Your MYSQL server might be dead and you won&#8217;t know it.<\/li>\n<li>Shared Libraries (.so) need the rx flag, x alone isn&#8217;t enough.<br \/>\n<code><\/code><code>subject \/bin\/bash { \u00a0 \u00a0<\/code><\/p>\n<pre>\/ \u00a0 \u00a0 \r\n\/lib \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0rx\r\n}<\/pre>\n<\/li>\n<li>The -V flag to gradm -E will give some useful information!<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A few notes I wrote down about enabling the (very intense) grsecuriy RBAC system on micro. If you have role_allow_ip defined and you try and &#8220;do something&#8221; from an IP not in that allowed list &#8211; you&#8217;ll end up in the default role. \u00a0That can be hard to figure out at first, you know you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,17,22,10],"tags":[19,21,65,64],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-computers","category-grsecurity","category-linux","category-technical","tag-grsec","tag-linux","tag-rbac","tag-technical"],"_links":{"self":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":5,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}