Git Product home page Git Product logo

Comments (3)

ddcc avatar ddcc commented on June 27, 2024

Yes, they can be put there as well instead of directly into the code. See https://github.com/firmadyne/firmadyne/blob/master/scripts/fixImage.sh for examples of where this is used.

However, generally there's not a single key-value pair that is necessary for the system to boot, but tens if not hundreds of key-value pairs. Thus, the easiest way to get a new firmware working is to figure out where the manufacturer stores the default values (e.g. after resetting the system), and add it to NVRAM_DEFAULTS_PATH in https://github.com/firmadyne/libnvram/blob/master/config.h .

from firmadyne.

tulipszs avatar tulipszs commented on June 27, 2024

@ddcc Can you provide some examples of where manufacturer stores default nvram values? Or how you would go about finding out? find . | grep -i nvram on the target filesystem only returned the nvram binary and library. Thanks

from firmadyne.

ddcc avatar ddcc commented on June 27, 2024

Unfortunately, it's a somewhat manual process of figuring out the NVRAM is being handled, and then looking to see where the values are coming from. If you look at the linked config.h file, sometimes the default values are stored in a file on the filesystem (PATH), or sometimes they are key-value pairs stored as a table in a shared symbol (TABLE). You probably want to search inside some of the binaries / libraries, either using something basic like strings <foo> | grep <bla>.

Alternatively, you can work backwards by figuring out where the boot process / program of interest is crashing, examine the last couple of NVRAM key/value pairs that were requested, overriding them with different values and seeing if you get farther. Additionally, disassembling / decompiling them and looking for anything interesting makes this process a lot easier.

from firmadyne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.