Results 1 to 13 of 13

Thread: Bypassing web login username with Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Bypassing web login username with Qt

    I received a very intriguing project.
    1) Suppose that you have a lot DVR accessed via WEB with login and password.
    2) The DVRs require special ActiveX (usually work with IE)
    3) Suppose that you have a lot of DVR and do not want to remember username and password, but just store them and then click on a button to access.

    I implemented the solution by using a proxy filtering like Proxomitron, and a webserver wich store DVR login info into Proxomitron. But the solution is quite bad.

    I know that with Qt you can user QActiveX container. And, thus, running IE inside Qt is not a problem.
    The problem is how to bypass the login of the DVR.
    I thought that you can make a proxy in Qt (not very difficult, not very easy). Then,
    modify the page and then pass it to the ActiveX.
    BUT: i do not know how to pass it!

    Any suggestion, very appreciated.
    Regards

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Bypassing web login username with Qt

    Regardless of the ActiveX component, it must just pass some kind of token to the server to accept the authorisation, and it seems that the authorisation is static as you already implemented a solution using Proxomitron. So all you need to do is figure out this data (try Wireshark) and send it yourself using Qt network classes. Typically it will be sent as some kind of GET or POST request, SSL-free, with perhaps some custom encryption or obfuscation by ActiveX object (which you don't care about as you only want to login as one particular user).

  3. #3
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Bypassing web login username with Qt

    I think the ActiveX container is necessary because the DVR works only with special ActiveX and only with IE (sorry!).
    Anyway I will try with Qt Network class, although I am not familiar with.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Bypassing web login username with Qt

    The ActiveX object only runs on your PC so you can emulate anything it does.

  5. #5
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Bypassing web login username with Qt

    This is the problem: I do not know how to do it. I will appreciate any pointer on the subject.
    So far, I can understand that with Qt Network Classes I can do everything that also curl and php can do.
    Remember also that cookies are important : I tried to send (with curl) POST data but with no success. I think the same will happen
    with Qt Network.
    Let's suppose, however, that I will be able to connect to the DVR. But then, how to display the page?
    In Qt WebKit? If yes, can WebKit handle ActiveX? If yes, how?
    Sorry for my in-expertise, but I would like to understand what I am missing.
    Regards

    1)

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Bypassing web login username with Qt

    You'll need a certain amount of knowledge of reverse engineering. If you can not do this then you will find it difficult to accomplish your task.

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Bypassing web login username with Qt

    We cannot tell you exactly how the ActiveX component does it. We can only tell you the usual ways these things are done. It is quite possible that the entire user interface is encapsulated in the ActiveX with some proprietary communication mechanism. In this case the only option might be to use ActiveQt to operate the ActiveX control and embed it like any other widget. It may be only the authentication part that is an ActiveX control, with the remainder of the DVR UI served as plain HTML: you could possible operate the ActiveX to log in and use webkit to display the results. Or, the ActiveX control could be a red herring, only existing to give a look and feel they could not reliably achieve in HTML, but all the underlying login and presentation is HTTP/HTML in which case QNetworkAccessManager and web kit would do it. You should try to work out which applies.

    You can use tools like Wireshark to look at what is actually sent on the wire. My bet is you will see HTTP GET and POST requests/responses only.

  8. #8
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Bypassing web login username with Qt

    Why is remembering a username and password so hard?

    Subverting these simple security measures is pretty much never a good idea. They're put in place to protect users, and sneaking around them exposes you and other users to all sorts of potential unpleasantness.

  9. #9
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Bypassing web login username with Qt

    This is project for a company, no problem. remembering 500 user's credentail is quite difficult, isn'it?G

  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Bypassing web login username with Qt

    If you can provide ActiveX object and some way of accessing a server which uses that object (doesn't matter if local or global) then perhaps I can take a look. My day job is automotive reverse engineering, but I think PC RE will not be much different. No guarantees though.

  11. #11
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Bypassing web login username with Qt

    Quote Originally Posted by giusepped View Post
    This is project for a company, no problem. remembering 500 user's credentail is quite difficult, isn'it?G
    There should be no reason for you or anyone else to remember - or even know - other user's passwords. Period. And yes, there certainly is a problem if you're proposing to log on to a service or machine using someone else's account; even system administrators don't need that information.

    Perhaps you should explain exactly what it is you're trying to accomplish, and why.

  12. #12
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Bypassing web login username with Qt

    I do know a fair number of other users passwords in the company I work for. The reasoning behind this is that it creates less work to do so. If someone comes from there vacation and says "I forgot my password" I can simply tell them rather than having to login to the appropriate system and change it. Its also easier if I'm doing work on a users PC to login as them rather than administrator.

    We also have cameras on site (I think most companies do now), but logging into each server to browse the cluster of cameras it supports is tedious, therefore we developed an application which displayed all cameras on a single web page. It authenticated the user via IP address and specific cookies being present. Not ideal, but then again, the camera data isn't a trade secret either.

  13. #13
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Windows

    Default Re: Bypassing web login username with Qt

    Hi, I am a bit of a newby to quicktime and i too have a similar problem. Only difference is that i would actually be quite happy to do the authentication with the activeX. I have spent hours and cannot quite figure out how to pass a user and password to to the activeX.

    Can somebody please point me in the right direction? I will hugely appreciate it!

Similar Threads

  1. MySQL Login?
    By steve.bush in forum Newbie
    Replies: 1
    Last Post: 6th April 2011, 22:19
  2. Login Form in QT
    By panyang in forum Newbie
    Replies: 9
    Last Post: 29th January 2011, 05:41
  3. Replies: 9
    Last Post: 16th November 2009, 08:26
  4. Replies: 12
    Last Post: 17th June 2009, 05:34
  5. writing a username and password dialog
    By sergec in forum Qt Programming
    Replies: 5
    Last Post: 25th April 2007, 17:24

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.