Windows 一键切换 JDK 版本
作为工具搜藏家,难免遇到 Java 环境不适配的问题。
昨天正好看到了个工具,很棒,改一改,水一篇。
原工具地址:https://github.com/HeyDorvin/jdk_version_switch
现工具地址:https://github.com/Y0n9zh/jdk_version_switch
使用说明
注:这是一个 Python3 脚本。
配置 Path
注:若之前有配置过其他有关 Java 的变量,建议全部删除。
在 Windows 系统变量处添加一条:
1%JAVA_HOME%\bin
添加 jdk_dir
修改 javas.py 中的 jdk_dir 值为自己 Java 的目录:
1234jdk_dir = { '1': 'C:\\Program Files\\Java\\jdk1.8.0_181', '2': 'C:\\Program Files\\Java\\jdk1.8.0_261'}
以管理员身份执行1python javas ...
常用端口&服务
参考文章:
https://tool.oschina.net/commons?type=7
http://www.iana.org/assignments/port-numbers
端口这块确实难记,整一篇。
只有常用的哦,非全端口。
著名端口
端口号
名称
20
FTP-data
21
FTP-Control
22
SSH
23
Telnet
25
SMTP
53
DNS
67
DHCP Server
68
DHCP Client
69
TFTP
70
Gopher
80
HTTP
88
Kerberos
110
POP3
115
SFTP
123
NPT
135
RPC
139
NetBIOS
161
SNMP
389
LADP
443
HTTPS
1080
Socks
1433
MS SQL(SQL Server)
1521
Orcale
2049
NFS
3128
Squid
3306
MySQL
3389
RDP
5432
PostgreSQL
5 ...
常用加密&编码
加密与编码是 Web 应用在传输数据时常用的技术之一,有以下四种常见场景:
存储密码加密
Web & 数据库 & 系统
传输数据编码
数据传输一致性
代码特性加密
JS 代码混淆
数据显示编码
字符
字符集
字符编码
存储密码加密
作为互联网公司的信息安全从业人员经常要处理撞库扫号事件,产生撞库扫号的根本原因是:一些企业发生了信息泄露事件,且这些泄露数据未加密或者加密方式比较弱,导致黑客可以还原出原始的用户密码。
要完全防止信息泄露是非常困难的事情,除了防止黑客外,还要防止内部人员泄密。
但如果采用合适的算法去加密用户密码,即使信息泄露出去,黑客也无法还原出原始的密码(或者还原的代价非常大)。
常见的数据加密算法有:
MD5
SHA
NTLM
AES
DES
RC4
哈希算法
哈希算法(Hash Algorithm)是一种将任意长度的数据映射为固定长度哈希值的算法。
它主要通过执行一系列数学运算和逻辑操作来生成哈希值,该哈希值通常用于数据完整性验证、身份验证、密码存储和查找等应用。
哈希算法的主要特点:
唯一性:对于不同的输入数据,哈希算法 ...
HTTP 常见状态码整理
不常用容易忘,整理一篇。
本篇文章参考:https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/100
信息响应(100-199)
状态码
状态消息
表示内容
100
Continue
表示目前为止一切正常,客户端应该继续请求,如果已完成请求则忽略。
101
Switching Protocol
表示服务器应客户端升级协议的请求,后去切换协议。
103
Early Hints
允许用户在服务器还在准备响应数据的时候预加载一些资源。
成功响应(200–299)
状态码
状态消息
表示内容
200
OK
表明请求已经成功。默认情况下状态码为 200 的响应可以被缓存。不同请求方式对于请求成功的意义如下:GET:已经取得资源,并将资源添加到响应的消息体中。HEAD:响应的消息体为头部信息。POST:响应的消息体中包含此次请求的结果。TRACE:响应的消息体中包含服务器接收到的请求信息。PUT 和 DELETE 的请求成功通常并不是响应200 OK的状态码而是 204 No Content 表示无内容 ...
Linux rbash 限制绕过
最近在打 Vulnhub,遇到了 rbash 需要绕过。
看着方法也很多,怕以后也遇到,写篇文章总结一下。
本篇文章参考:
https://man.cx/bash
https://www.lxlinux.net/restricted-shell.html
https://www.hackingarticles.in/multiple-methods-to-bypass-restricted-shell/
https://blog.csdn.net/qq_60848021/article/details/130041922
rbash 介绍
rbash(restricted bash):是一种受限制的 Unix/Linux shell 环境,它是 Bash Shell 的一种变体,旨在提供一种更安全的 Shell 环境,限制用户对系统的访问和操作权限。
当用户被分配了 rbash 作为其默认 Shell 时,他们将无法执行许多常见的操作,例如:更改当前工作目录、重定向输入 / 输出、使用某些命令或设置特定的环境变量。
rbash 通常用于限制用户的操作范围,以 ...
DC-2
写写打靶记录。
靶机地址:https://www.vulnhub.com/entry/dc-2,311/
参考文章:
https://blog.csdn.net/qq_44117967/article/details/129257289
信息收集
注:少见的一台可以使用 VMware Workstation 直接打开的靶机。
首先查看 Kali IP 地址:
1234567891011121314root at kali in ~ $ ip --color address1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 sco ...
Cewl 工具简单使用
最近在打 Vulnhub,需要使用到 Cewl 进行页面关键字爬取,记录一下。
本篇文章参考:
https://www.ddosi.org/cewl/
工具介绍
Cewl(Custom Wordlist Generator)是一款用于生成自定义字典(wordlist)的工具。它可以分析文本、网页或其他文档,并提取其中的单词和短语,然后将它们组合成一个字典以供密码破解和渗透测试等用途使用。
Cewl 工具的主要功能如下:
自定义字典生成:Cewl 可以基于指定的输入文本或网页源代码,提取其中的单词和短语,并将它们组合成一个自定义的字典。这个字典可以包含常见的单词、专业术语、组织名称、个人姓名等,从而增加密码破解和渗透测试的成功率。
网页分析:Cewl 可以分析给定的网页或整个网站,并提取其中的文本内容。它会忽略 HTML 标签和其他非文本元素,仅关注实际的单词和短语。
单词频率统计:Cewl 可以统计提取的单词和短语在源文本中出现的频率。这有助于确定哪些单词更常见,从而优化生成的字典的内容。
忽略常见单词:Cewl 具有一个内置的常见单词列表,可以用于过滤掉常见的单词,从而生成更 ...
WPScan 工具简单使用
最近在打 Vulnhub,正巧遇到了 Wordpress,想起以前用的一个工具 wpscan,做个记录吧。
本篇文章参考:
https://cloud.tencent.com/developer/article/1937633
https://blog.csdn.net/guo15890025019/article/details/118548932
工具介绍
WPScan 是一款用于 WordPress 网站的漏洞扫描和安全检测的开源工具。它是一个命令行工具,旨在帮助安全专家和网站管理员发现和修复可能存在的 WordPress 漏洞和安全问题。
以下是 WPScan 工具的一些主要特点和功能:
漏洞扫描:WPScan 可以扫描 WordPress 网站以查找已知漏洞和安全问题。它使用一个广泛的漏洞数据库来检测潜在的安全漏洞,包括已公开披露的漏洞、插件和主题的已知漏洞等。
用户名枚举:WPScan 可以尝试枚举 WordPress 网站的有效用户名。这可以帮助攻击者确定目标网站上存在的有效用户,从而进行更有针对性的攻击。
弱密码猜测:WPScan 可以进行弱密码猜测攻击,尝试使 ...
Linux find 命令详解
最近再弄应急方面的内容,find 好久没用了,写篇文章备忘。
本篇文章参考:
https://man.cx/find
https://blog.51cto.com/yttitan/2306703
find 基本用途find 概述
在官方 Man 手册中,find 的作用是:在目录层次结构中搜索文件。
命令使用结构如下:
1find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]
find 选项
由于 find 选项过于多了,这里只挑我经常用到或者看到的。
–help
find --help 是一个在类Unix操作系统中使用的命令,用于显示 find 命令的帮助手册或文档。
find --help 更多的是用法而不是说明,示例如下:
1234567891011121314151617181920212223242526272829303132333435[root@localhost ~]# find --helpUsage: find [-H] [-L] [-P] [-Ol ...
Linux 时间戳简述
最近再弄应急方面的内容,find 好久没用了,时间戳都忘了啥意思,写篇文章备忘。
本篇文章参考:
https://man.cx/stat
https://man.cx/touch
https://blog.csdn.net/cclethe/article/details/126357403
statstat 概述
stat:显示文件或文件系统状态。
12345678910[root@localhost ~]# stat /etc/passwd File: ‘/etc/passwd’ Size: 2309 Blocks: 8 IO Block: 4096 regular fileDevice: fd00h/64768d Inode: 34179165 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Context: system_u:object_r:passwd_file_t:s0Access: 2023-11-08 ...