靶机渗透实战-Vulnhub-Driftingblues7
靶机渗透实战-Vulnhub-Driftingblues7主机发现不需要主机发现,IP为222.24.6.94。
信息收集1nmap -sV -A -p- -T4 222.24.6.94
回显如下:
1234567891011121314151617181920212223242526272829303132333435363738Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 17:34 CSTNmap scan report for 222.24.6.94Host is up (0.000029s latency).Not shown: 65527 closed tcp ports (conn-refused)PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 7.4 (protocol 2.0)| ssh-hostkey: | 2048 c4:fa:e5:5f:88:c1:a1:f0:51:8b:ae:e3: ...
靶机渗透实战-Vulnhub-Driftingblues6
靶机渗透实战-Vulnhub-Driftingblues6主机发现1nmap 222.24.6.0/24
发现IP为222.24.6.219,回显如下:
123456Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 16:43 CST Nmap scan report for 222.24.6.219Host is up (0.00024s latency).Not shown: 999 closed tcp ports (conn-refused) PORT STATE SERVICE80/tcp open http
详细扫一遍端口:
1nmap -sV -A -p- -T4 222.24.6.219
发现就只有80端口:
12345678910111213Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 16:48 CSTNmap scan report for 222.24.6.219Host is up (0.000042s latency ...
靶机渗透实战-Vulnhub-Driftingblues5
靶机渗透实战-Vulnhub-Driftingblues5主机发现1nmap 222.24.6.0/24
回显:
123456Nmap scan report for 222.24.6.173Host is up (0.00084s latency).Not shown: 998 closed tcp ports (conn-refused)PORT STATE SERVICE22/tcp open ssh80/tcp open http
详细端口扫描:
1nmap -sV -A -p- -T4 222.24.6.173
回显:
12345678910111213141516171819Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 15:31 CSTNmap scan report for 222.24.6.173Host is up (0.0041s latency).Not shown: 65533 closed tcp ports (conn-refused)PORT STATE SERVICE ...
靶机渗透实战-Vulnhub-Driftingblues3
靶机渗透实战-Vulnhub-Driftingblues3主机发现1nmap 222.24.6.0/24
回显如下,无关信息略:
1234567Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 14:18 CSTNmap scan report for 222.24.6.185Host is up (0.000053s latency).Not shown: 998 closed tcp ports (conn-refused)PORT STATE SERVICE22/tcp open ssh80/tcp open http
确认IP为222.24.6.185,只有个22端口的SSH和80端口的HTTP。详细扫描端口:
1nmap -sV -A -p- -T4 222.24.6.185
回显如下:
12345678910111213141516171819Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 14:25 CSTNmap scan re ...
Python技巧随笔
Python技巧随笔Magic识别文件类型。
12345import magicm=magic.Magic()file_path="example.txt"file_type=m.from_file(file_path)print(file_type) #ASCII text
检查远程文件类型:
123url="http://example.com/file.zip"mime_type=m.from_url(url)print(mime_type)
自定义数据库:
12345import magicm=magic.Magic(magic_file="path/to/magic.mgc")file_path="example.txt"file_type=m.from_file(file_path)print(file_type)
在magic.mgc数据库中,每一行这样写:
1>0 string PK\003\004 Zip archive data
“>0”表示从文件开始处偏移量为0。
...
常用Bootstrap方法
常用Bootstrap方法开始12345678910111213141516171819202122<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'" /> <meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self ...
Electron入门
Electron入门换源淘宝今年刚刚换源了,结果怎么设置都报错,所以干脆使用官方源。
Windows下输入:
1npm config edit
添加:
123disturl=https://registry.npmmirror.com/-/binary/nodeelectron_mirror=https://registry.npmmirror.com/-/binary/electron/registry=https://registry.npmmirror.com
运行Hello World新建一个项目文件夹,在该文件夹下:
1npm init
“package.json”文件中写了一些该工程的基本信息,入口点默认“index.js”,如果看着别扭可以自己改成“main.js”。
然后开始在该工程文件夹下下载Electron组件:
1npm install electron --save-dev
打开“package.json”的“scripts”字段下加上:
1"start":"electron .",
在该工程文件夹下新建“ind ...
Web入门-类实战
Web入门-类实战基础知识做题[GKCTF 2021]easycms扫网站发现admin.php后台,尝试弱口令admin/12345成功。
来到设计->导出主题->保存,开始下载一个压缩包,复制下载连接发现Base64编码部分为本地路径,尝试将“/flag”编码后加入URL。
1node4.anna.nssctf.cn:28980/admin.php?m=ui&f=downloadtheme&theme=L2ZsYWc=
成功下载。
Web入门-常见信息搜集方法
Web入门-常见信息搜集方法基础知识git相关常规.git文件夹泄漏:
1234567git initgit add flag.phpgit commit -m "flag"scrabble http://127.0.0.1/git_testlscat flag.php
git回滚:
1234567891011cat flag.phpecho "flag is old" > flag.phpgit add flag.phpgit commit -m "old"scrabble http://127.0.0.1/git_testlscat flag.phpgit reset --hard HEAD^lscat flag.php
也可通过git log -stat查看每个commit修改了哪些文件,再用git diff HEAD commit-id比较当前版本和想查看的commit之间的变化。
git分支:
用GitHacker工具,略。
其他git泄漏:.git/config文件夹可能有access_toke ...
PWN入门-栈迁移
PWN入门-栈迁移基本原理在正常栈溢出时,需要设计ebp和Return Address俩。ebp篡改为需要将栈迁移到的地址-4,Return Address需要篡改为某个含leave;retn;的ROPgadget。
实际运行时,先运行原先的leave;retn;:mov esp,ebp;时esp指向被篡改的ebp;pop ebp;将篡改的地址放入ebp,且esp上移,指向被篡改的Return Address;pop eip;将ROPgadget的地址放入eip,篡改执行流。
在进入ROPgadget后,再次执行leave;retn;:mov esp,ebp时将迁移地址-4移入esp,栈顶指针被劫持,发生栈迁移;pop ebp;时ebp仍为迁移地址-4,但esp拉高4字节,指向迁移地址;pop eip时迁移地址移入eip,成功篡改执行流。
做题[HDCTF 2023]KEEP ON123456789101112131415161718192021222324from pwn import *context(log_level='debug',os='lin ...