Giter Site home page Giter Site logo

linux-admin's Introduction

linux-admin

Boot order of RHEL

image

Analyse system boot time use systemd-analyze blame

image

Check which services are installed in the local Linux system use systemctl list-unit-files --type service and systemctl list-dependencies service-name and systemctl get-default and systemctl set-default

image

image

image

image

Troubleshoot Library Dependency Issues on Linux

tcpdump -c 5 -i eth0

ldd $(which tcpdump) | grep libpcap

dnf whatprovides /libpcap.so

dnf reinstall -y libpcap

tcpdump -c 5 -i eth0

image

Install NFS utili and Create and Export the File System

on server side image image

on client side image

Using systemctl to configure process setting

The systemctl utility is used for so many tasks and contains such a large amount of subcommands that it can be slightly intimidating at first for those familiar with individual commands for most management tasks.

We'll get you used to using systemctl to view systemd's environment, settings, view status on services, show and set parameters that affect service function, and understand what happens when you set settings, both from a systemd daemon perspective, as well as drop-in directories and additional configuration add-ins.

image

image

Use journalctl to record events on Linux

image image image image check specific time range image image

image

systemctl list-unit-files --all list all units

image

Filtering logs of specific units/daemons/services. journalctl -u unit-name image

journalctl --disk-usage

Getting kernel logs. Sometimes we need to check if the kernel is working properly or if something went wrong obtain information that help us solve the problem. Getting kernel logs is very straight forward, we would use journalctl plus the -k option. image

systemctl status unit-name -l image

Tuned profile setting

image image

Amazon Linux 2 NetworkManager

yum install NetworkManager image image image image image image image

image image image

Linux kernerl images review and set

more /proc/cmdline and dmesg |grep "Command line" and sysctl

image image

Write variable from command line image

image

Managing and Optimizing kernel behaviour through modules

lsmod/modinfo/modprobe (add/remove modules to/from kernel modprobe (-r) module_name)

image

Analyze system and application performance

htop/iotop/nmon/glances (pip3 install glances)/mpstat/iostat/vmstat image image image

[root@ip-10-42-149-184 nmonchart]# glances -w -p 8080 Glances Web User Interface started on http://0.0.0.0:8080/ image

nmon batch mode collect data and show use nmonchart

nmon -f -s60 -c60 -t ( -s for collection interval and -c for the number of snapshots, including capturing of top processes -t)

curl -LO http://sourceforge.net/projects/nmon/files/nmonchart40.tar

./nmonchart /root/ip-10-42-149-184_230322_1055.nmon /var/www/html/nmon.html

image https://www.redhat.com/sysadmin/monitor-linux-performance-nmon

valgrind to check memory leak

image

yum package

yum group list/yum group install "group-name"/yum group info 'Development Tools' -v/yum list installed package-name/yum list available package-name/yum check-update/ yum check-update package-name/yum update (-y)

yum list available/yum list --installed/yum whatprovides [file_name] image image image

dnf package management

dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm / dnf repolist/ dnf list available package-name image

nmap and tcpdump for traffic analyse

nmap -A -F 10.42.149.184 (nmap -sU -F ip-address for UDP ports scan)

image

nmap -O -sV target_ip -Pn

image

tcpdump -i eth0 src 10.240.9.87 image

image

ss and lsof

ss is used to dump socket statistics. It allows showing information similar to netstat. It can display more TCP and state information than other tools.

ss -tlnp /netstat -antlp/lsof -i TCP:22/lsof -p pid image image

network manager and if-cfg compare

image image image image

hostnamectl to set hostname

hostnamectl set-hostname new-hostname image

rsyslog is a powerful, secure and high-performance log processing system which accepts data from different types of source (systems/applications) and outputs it into multiple formats.It can also used to centralize all servers logs together.

image

ip link command

image image image

Systemd

systemctl status httpd --with-dependencies image systemctl list-dependencies image ps -xawf image

image image image

image image systemctl/systemctl -a image image systemctl list-units --type service --state active image image image

image

image image

loginctl

image image

timedatectl

image

nc netcat is a computer networking utility for reading from and writing to network connections using TCP or UDP.

image

firewall-cmd

image image image

selinux

image image

logrotate

image image

Directory bursting

DIRB is a popular Linux command-line tool used to scan and bruteforce directories on web applications. It enumerates possible directories from a wordlist against a website URL. sudo apt install dirb or sudo yum update/sudo yum install gcc make libcurl libcurl-devel/wget https://github.com/v0re/dirb/archive/master.zip/unzip master.zip/cd dirb-master ./configure ,make/sudo make install image

SQL Injection

The --technique=B option in SQLmap specifies the SQL injection technique to be used during the scanning process. Specifically, B stands for "Boolean-based blind" injection technique.

Boolean-based blind injection is a type of SQL injection where the application's response changes based on whether the injected SQL query returns true or false. SQLmap can exploit this behavior by sending SQL injection payloads and analyzing the application's responses to infer the structure and content of the database.

Here's a brief explanation of how Boolean-based blind injection works:

SQLmap sends a series of SQL injection payloads to the application. It analyzes the responses to determine if the injected query is evaluated as true or false. Based on the application's responses, SQLmap infers information about the underlying database structure, such as table and column names, and data content. Using --technique=B in SQLmap tells the tool to focus on exploiting SQL injection vulnerabilities using the Boolean-based blind technique. This can be particularly useful when other techniques like error-based or time-based blind injection are not effective or not applicable.

However, it's important to note that the effectiveness of the Boolean-based blind technique depends on various factors such as the complexity of the injected SQL query, the application's response time, and the configuration of the database server. Additionally, using SQL injection tools like SQLmap should only be done with proper authorization and on systems you own or have explicit permission to test. Unauthorized use of such tools can lead to legal consequences.

image Sample of SOAPUIRequest image image image

Kali Linux

Kali Linux is a Debian-based Linux distribution specifically designed for digital forensics and penetration testing. It is developed and maintained by Offensive Security, a leading provider of security training and penetration testing services.

Kali Linux comes pre-installed with numerous penetration testing tools, including tools for:

Network scanning and reconnaissance. Web application analysis and exploitation. Wireless network analysis and exploitation. Password cracking. Forensic analysis. Reverse engineering. Social engineering. Some of the popular tools included in Kali Linux are Nmap, Wireshark, Metasploit Framework, Burp Suite, John the Ripper, Aircrack-ng, and many more.

Kali Linux is widely used by cybersecurity professionals, ethical hackers, penetration testers, and security researchers for various purposes, including security assessments, vulnerability assessments, and security training.

linux-admin's People

Contributors

xiongye77 avatar

Watchers

 avatar

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.