dll code, don't know how to proceed
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: dll code, don't know how to proceed

  1. #1
    Join Date
    Nov 2017
    Posts
    3

    dll code, don't know how to proceed

    hello,
    so I wanna make a dll injection using this c++ code https://github.com/tensaix2j/DLLinjection I haven't tried it yet but I think it will work, so I wanna inject it to an application that looks something like this
    Name:  rank2.jpg
Views: 113
Size:  15.8 KB
    and I wanna manipulate the way it works something like making a dll code saying that "put person_D at the top" or "delete person_A from the list". So days of research about this I haven't found anything that could help me but something came up my mind, can I do it like
    "
    for rows in ranking_column
    ___if rows == person_A
    ______delete person_A
    "
    but still don't know how do I do that, I think I still need to "handle"(I don't know if this is right term) the column so that I could do things like that..
    well thanks anyway..........

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    19,006

    Re: dll code, don't know how to proceed

    Do you know the window/control class or type that is used to create/show this table?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2017
    Posts
    3

    Re: dll code, don't know how to proceed

    helllo, thank you for the reply, but sorry for my late response, hope your(or anyone) still reading this,
    that's my problem... I had this in my mind but don't know how to get the thing that I need,
    (this is still based on the image above)
    Code:
    for rows in Rank_column
        if fows == person_A
             delete person_A
    now this is my problem how do I get the "Rank_column", this might be impossible...

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    19,006

    Re: dll code, don't know how to proceed

    Quote Originally Posted by jhave21 View Post
    ...
    now this is my problem how do I get the "Rank_column", this might be impossible...
    Exactly! Try to use Spy++ to know what control type is used for this table.
    Victor Nijegorodov

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,578

    Re: dll code, don't know how to proceed

    Quote Originally Posted by jhave21 View Post
    hello,
    so I wanna make a dll injection
    No, you don't. What you want is manipulating data presentation, and dll injection is just a way how to deliver your sabotaging code to a victim process guts. Nothing more than that. To have a code you need to have an idea of how the data get presented in the grid, and what actually the program does to make those rows to show up with the data in those grid cells and in the order those currently appear. If you have no clear understanding of the entire logic, you may be really surprised when you find the grid recovering its original state all of a sudden after your seemingly successful intrusion. Or probably you find the program crashing immediately after one. Which merely means just a lack of some knowledge. And even when you understand how the things work, in general, bending things without crashing those still is an art, but not a plain how-to matter.

    No offence intended, but prior to (or maybe instead of) hacking into something you'd better learn the ways of how to build that something. Building safe and solid things is an enterprise much more noble than impressing with a stunt a girlfriend. Or a bunch of dumbfriends.
    Last edited by Igor Vartanov; November 27th, 2017 at 05:12 PM.
    Best regards,
    Igor

  6. #6
    Join Date
    Nov 2017
    Posts
    3

    Re: dll code, don't know how to proceed

    hello Igor and VictorN, thanks for the reply,
    about the reply of Igor, does that mean I need to know first if how does the program get the data that it shows in the application and how does it shows it?
    is this something like this?for example, I have an application that get's it's data from the web, if you wouldn't mind may I ask, after I knew that the data it has is from the web how do I manipulate the data?
    well anyway, thanks for the support

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    19,006

    Re: dll code, don't know how to proceed

    Quote Originally Posted by jhave21 View Post
    ...
    about the reply of Igor, does that mean I need to know first if how does the program get the data that it shows in the application and how does it shows it?
    Yes!!!
    Victor Nijegorodov

  8. #8
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,578

    Re: dll code, don't know how to proceed

    Quote Originally Posted by jhave21 View Post
    about the reply of Igor, does that mean I need to know first if how does the program get the data that it shows in the application and how does it shows it?
    is this something like this?
    Normally a GUI program has some structure where specific layers have some limited responsibility. You ever heard of MVC? Model takes care of data management. View takes care of data presentation. Controller takes care of processing workflow based on events, internal ones or inputs coming from outer world.

    Now, simple situation. Your dll is successfully injected and say it has data grid (View) located. It finds a particular row and deletes it. This is what I call a seeming success. A bit later Controller appears in need to refresh the grid content... and the deleted row gets resurrected. Oops! This is the effect you hardly count on originally.

    The second situation, same simple. You succeed with row deletion. Unfortunately the careless program developer designed it to store some data in association with the grid rows. Now the row is gone along with the data. NULL data pointer returned from View gets dereferenced, and BOOM! The program crashes. Or maybe some Controller routine decides to update the data of the gone row, and it updates that alright, but now the row is wrong. Another Controller routine works with the affected row, but the data pointer is now wrong. BOOM!!!

    Or another situation. Say the row is gone, and data update comes to a wrong row, and Controller decides to persist the data with Model because of its internal schedule. Congratulations! Your database is full of garbage and the record logs show your name.

    And so on and so forth... The more complex the program you fumble with, the more quirky effects you are to run into. Welcome to the real world.
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)