Giter VIP home page Giter VIP logo

cornerstone's People

Contributors

kkilloas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cornerstone's Issues

AUDIT_LASTHISTLINE="${AUDIT_CMD%%+([^ 0-9])*}" 貌似不生效?

请教一下,貌似以下语句这种写法,好像不会生效吧?
AUDIT_LASTHISTLINE="${AUDIT_CMD%%+([^ 0-9])*}"
是不是要改成
AUDIT_LASTHISTLINE="${AUDIT_CMD%%+[^ 0-9]*}"

具体代码块

function AUDIT_DEBUG() {
  if [ -z "$AUDIT_LASTHISTLINE" ]; then                     #initialization
    local AUDIT_CMD="$(fc -l -1 -1 2>/dev/null)"                       #previous history command
    AUDIT_LASTHISTLINE="${AUDIT_CMD%%+([^ 0-9])*}"
  else
    AUDIT_LASTHISTLINE="$AUDIT_HISTLINE"
  fi
  local AUDIT_CMD="$(history 1)"                            #current history command
  AUDIT_HISTLINE=$(/bin/echo $AUDIT_CMD |/bin/awk '{print $1}')
  if [ "$AUDIT_HISTLINE" != "$AUDIT_LASTHISTLINE" ] || [ "$AUDIT_HISTLINE" = "1" ]; then  #avoid logging unexecuted commands after 'ctrl-c', 'empty+enter', or after 'ctrl-d'
    LOGGER
  fi
}

脚本使用请教几个问题

首先非常感谢陌陌安全团队的贡献,这个脚本很有用
然后我想请教2个问题

  1. /var/log/messages 日志应该存在写入速率限制,陌陌是如何解决的呢?
  2. vim内执行命令的审计,我看了公众号上的文章说是可以审计的,但我简单测试了下,没有效果,具体是指的什么内容呢?

探讨下

请问 .bash_history 和jumpserver记录的有什么区别?
第二个问题是探讨型,为何采用这种方式收集?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.