Thread: [NXT] win64 Ghidra refactoring script

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 [NXT] win64 Ghidra refactoring script 
    Registered Member

    Join Date
    Nov 2014
    Posts
    49
    Thanks given
    21
    Thanks received
    66
    Rep Power
    177
    Preface
    I noticed some people have been profiting from the recent NXT leaks. Since I really hate this kind of behavior I'll be releasing tools and tutorials over the next few weeks that should help out anyone trying to get going with NXT. I might possibly write an open-source framework from scratch that has NXT support too.

    What does it do
    This tool performs the following operations automatically:
    - Creates classes and structures (and sets up some fields): jag::Isaac, jag::Client, jag::HeapInterface, jag::Packet, jag::ConnectionManager.
    - Renames certain methods that are related to structures in the aforementioned classes.
    - Renames all packet decoders (ServerProt), and applies a comment header.
    - Prints the packet opcodes, sizes, and names to the console.
    - Updated Support printing ServerProt opcode->name and ServerProt opcode->size mapping in Kotlin code style
    - Updated Support detecting ClientProt opcodes+sizes (NOT NAMES), and printing ClientProt opcode->size mapping in Kotlin code style



    What does it not do
    - Give you source code that works
    - Spoonfeed you all of NXT

    Latest release tested on (this list might change in the future)
    - win64 916 ghidra 9.1.1 and 9.2.3
    - win64 918 ghidra 9.1.1 and 9.2.3
    Note For Ghidra 9.2.3 read the note at the bottom of this post. Thanks to Woahscam for testing with Ghidra 9.2.3!

    Usage:
    If your Ghidra project is not fresh, please make a backup before running this script. This script might override some of the changes you have made.

    - Step 1
    Create a new Ghidra project and import a recent win64 client. Older versions (<913?) may not work. Run the default analysis and wait for it to complete.

    - Step 2
    Open the scripts editor by clicking the following icon:


    - Step 3
    Create a new script by clicking the following icon:


    In the pop-up dialogue, select "java" script. Click OK. Name the script "RS3NXTRefactorer.java". Click OK.

    - Step 4
    - Open the scripts editor by clicking the icon marked with a 1
    - Paste your pasta in the window on the right marked with a 2. If you couldn't figure this step out please just close this thread - let's be honest, you're never going to get NXT to work.
    - Select the script on the left pane marked with a 3. Basically, the script you just created.
    - Execute the script. Hang back and wait for the tool to do its magic. This should take roughly 10-30 seconds. To execute the script press the button marked with a 4.


    -Step 5
    Enjoy your somewhat refactored client! This should save you many many hours.



    The download
    Yes, the download is hidden at the bottom! You should read usage instructions first anyway.

    I would like to kindly ask everyone that is interested in using this tool, that uses this tool, or that modifies/forks this tool, to star the repo and to share at least some of their finds with the rest of this community. It's a shame that it took 4 years and a leak to get NXT out there. It's unhealthy for the community as a whole to only take and never give.

    That being said, you can find the Github repository containing the script here. Note that opening this in a code editor won't yield many useful results, since I threw the script in there without a build system.
    [Only registered and activated users can see links. ]

    Yes the code is terrible, I wrote it late at night last week, deal with it.

    Note
    I've heard that on some newer Ghidra versions there is an error on line 874. If the script doesn't execute you could try replacing the insn.getRegisters().length == 0 with insn.getRegisters().size() == 0.

    Credits
    - This tool was entirely made by me. I did not receive help or information from anyone to create this tool.
    - woahscam for testing this tool on Ghidra 9.2.3.
    - This god-tier thread and all its contributors: [Only registered and activated users can see links. ].
    Last edited by techdaan; 05-01-2021 at 06:30 PM. Reason: Updated the script
    Reply With Quote  
     


  2. #2  
    Donator


    Join Date
    May 2012
    Posts
    250
    Thanks given
    93
    Thanks received
    96
    Rep Power
    78
    Works like a charm, good job.
    Add my skype for services!
    Check out my services @ [Only registered and activated users can see links. ]
    Also check out my Matrix 3 services thread @ [Only registered and activated users can see links. ]
    Skype : [Only registered and activated users can see links. ].
    Email : [Only registered and activated users can see links. ]
    RSPS SERVICES!
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Nov 2014
    Posts
    49
    Thanks given
    21
    Thanks received
    66
    Rep Power
    177
    Quote Originally Posted by ARMAR X K1NG View Post
    Works like a charm, good job.
    Thanks for testing it and the feedback!
    Reply With Quote  
     

  4. #4  
    Registered Member woahscam's Avatar
    Join Date
    Aug 2013
    Posts
    12
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Excellent work. Excited to see this out there. Will help out a ton for people that are interested in developing NXT.
    Reply With Quote  
     

  5. #5  
    Registered Member A_T_D's Avatar
    Join Date
    Dec 2020
    Posts
    1
    Thanks given
    0
    Thanks received
    3
    Discord
    View profile
    Rep Power
    0
    Can confirm this works as intended, amazing to see you release another NXT thread. Can't wait for the next one.
    Reply With Quote  
     

  6. #6  
    08-13, SpawnScape Owner

    jet kai's Avatar
    Join Date
    Dec 2009
    Age
    25
    Posts
    760
    Thanks given
    409
    Thanks received
    405
    Discord
    View profile
    Rep Power
    2163
    Thanks for this! Git is loom in’ good
    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member Fallore's Avatar
    Join Date
    Jan 2019
    Posts
    42
    Thanks given
    3
    Thanks received
    10
    Discord
    View profile
    Rep Power
    15
    I love your mentality Daan, screw those who only benefit.
    Thank you for the share.
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Nov 2014
    Posts
    49
    Thanks given
    21
    Thanks received
    66
    Rep Power
    177
    I just pushed an update to the Github repository, it has been tested on 916 and 918.

    The following features have been added:
    - Support printing ServerProt opcode->size and opcode->name mappings in Kotlin map style
    - Support finding ClientProt and printing the opcode->size mappings in Kotlin map style

    I doubt finding ClientProt names automatically like ServerProt is (easily?) possible. I might look into this later

    Preview:


    You can x-ref these structures to find the packet encoders.
    Reply With Quote  
     

  9. Thankful user:


  10. #9  
    Contributor


    Join Date
    Dec 2009
    Posts
    765
    Thanks given
    346
    Thanks received
    421
    Discord
    View profile
    Rep Power
    834
    Amazing work u did there. I think I'm going to start archiving the binaries, cache and provide a refactored client using this. Thank you very much for sharing.
    link removed
    Reply With Quote  
     

  11. Thankful users:


  12. #10  
    Registered Member

    Join Date
    Nov 2014
    Posts
    49
    Thanks given
    21
    Thanks received
    66
    Rep Power
    177
    Quote Originally Posted by Displee View Post
    Amazing work u did there. I think I'm going to start archiving the binaries, cache and provide a refactored client using this. Thank you very much for sharing.
    Sounds like a great plan, if you want you can look at the Github repo I made a few days ago that contains my server framework. It might have some things you could use (it has a client downloader for all binary types, for example). Once it's a bit more matured (can launch RS and maybe lobby) I'll make a project thread on here.

    I have some nice features planned for my framework, but one base idea is that all the tooling required is bundled in the framework. That way there's no external dependencies other than Ghidra to get your own NXT RSPS going.
    Reply With Quote  
     

  13. Thankful users:


Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. ultimate compiler script
    By saboreth in forum RS2 Server
    Replies: 1
    Last Post: 09-07-2007, 11:57 AM
  2. [ADE] Scripts for your server
    By Budda in forum Tutorials
    Replies: 9
    Last Post: 06-13-2007, 07:51 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •