Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement an audit script based on Bash Shell

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to implement an audit script based on Bash Shell. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.

Windows, whether it is to check the log, or scan the webshell, there are ready-made tools to use, after all, visualization, dry what is also convenient, Linux is more troublesome, customers do not allow to install this, do not allow to install that, in some special cases, the server does not even have a Python environment, write it with perl, but also more troublesome.

I suddenly remembered that I had written two small scripts. After class, I changed them for nothing and sent them to my friends. The scripts have no technical content. They are nothing more than awk, grep, find, function, etc., hoping to come in handy.

The overall operation interface is like this, the interface is familiar, msf graphics, hahaha.

It is divided into three parts:

Webshell backdoor scanning

2. Website log analysis

III. Log Search

Webshell backdoor scanning

The main content is to get the user input content through read -p, and then make a judgment.

Here you need to enter the path of the website you want to scan. The dictionary path is optional. If it is left blank, you will execute what has been written. If you customize it, you need to enter the dictionary path yourself.

Some of you may not be able to read the picture clearly, so I'll just post a short command.

if [ -z $filepath ];thenecho -e "\033[1;31m Please enter the path to scan!\ 033[0m"webscanelif [ -z $wordlist ];thenecho "------------------------------------"echo -e "\033[44;37m Webpath: $filepath \033[0m"echo -e "\033 [44; 37m Dictionary path: $wordlist \033[0m"echo "-------------------------------------------------------------------"find $filepath -name "*.php"| xargs egrep "eval|

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report