@Virgus:
How to use the "copy_binaries" modification?
Please try to find the writing (of mine) here in this thread, in which I've proposed the "right" usage of the "add/replace binaries" modification - I myself did not record all of those links ... the internal search engine should help you nevertheless to locate it.
As a really short repetition: This archive needs a special name and has to mirror the sub-directory structure of the original firmware, to extract each contained file at the right target.
Where can you find usable (pre-compiled) binaries?
The "bin" sub-directory of a "modfs" archive contains at least a statically linked BusyBox binary, which was built on top of a more recent version from upstream (but it's still not the most current - 1.27.x). The OpenSSL command line utility aside this BusyBox binary was also linked statically and may be used without any additional files needed. Obviously these files are running on a FRITZ!Box device - you're using them already, while you're working with "modfs".
There are further files - unsquashfs/mksquashfs to (de-)construct SquashFS images, make and check "extX" file system tools and possibly a command line tool to handle AVMs encipherment of settings. All of these files are a little bit "suspicious", due to the lack of my signature for each single one or all of them together.
Nevertheless you could decide to use them ... as far as I know, the files from fritzmod.net were also never signed.
If you're looking for other files and want to trust my signature, you may have a look onto the "bin" sub-directory of my YourFritz repository on GitHub. There you can find a bunch of signed utilities for MIPS devices - please be aware, that they're assembled in a special branch "binaries" and not visible, as long as the current branch is "master" (the default one).
Because I've never wrote about them in the past (and I've reorganized it a bit some days ago), this writing will now (one more time
) get longer, than I planned it.
The files contained therein (at this moment) are the following:
- a BusyBox binary ... usually created with the same settings as the BusyBox from "modfs" archives; call "busybox bbconfig" to get a copy of the .config file used to build it
- a utility to handle various aspects of decipherment for AVMs encrypted settings (from https://github.com/PeterPawn/decoder)
- a 'dropbearmulti' binary, which may be used as a server and client for SSH connections; this one is a little bit "crippled" and was built from my Freetz fork (https://github.com/PeterPawn/freetz/tree/YourFritz/make/dropbear/patches/yourfritz) with very special changes - nevertheless it's usable with any SSH client or server, as long as the contained (very limited, but secure) cipher selections are supported by the other side (it needs additional symbolic links - for the contained parts - in the file system)
- a SFTP server extension usable with 'dropbearmulti' (please note later comments regarding path name requirements)
- an OpenSSL command line utility to provide crypto technology and secure network connections for other programs or scripts; together with this binary, the BusyBox (from above) applet 'wget' may be used to download files from HTTPS sources, too (it's not possible with AVMs version of BusyBox)
- a Shell-In-a-Box binary, which uses the internal certificate from FRITZ!OS (self-signed or user-provided)
- a 'stunnel' binary - it's a TLS wrapper for unencrypted (TCP) connections of any kind and may be used to provide more security for such connections or to add own "secure service(s)" to a device (e.g. gathering/providing some information with shell scripts on a FRITZ!OS device), which use(s) client certificates, to limit use of such services to a bunch of authorized hosts - this program may also use the certificate and key from FRITZ!OS for its own connections
- tools to assemble/disassemble a SquashFS image with AVMs format
- the shell scripts from the "signimage" sub-directory, which were described (of mine - take this as a hint to limit search results) in a different thread, which regards AVMs firmware signing process
- various "helper" scripts for TFFS handling (from the "tffs" sub-directory in the repository)
- and last, but not least some very (very) simple shell scripts (more 'one-liners') to repeat often needed tasks ... reset the 'tainted' flag for the firmware, wait for an established internet connection (works only with devices in router mode) or wait until a valid date/time was set after the device was booted shortly ago
All of these files are (a) built from my Freetz fork and usually statically linked or rely only on the uClibc libraries, which should be present within each FRITZ!OS installation or were (b) taken from other sub-directories in the YourFritz repository and are self-explaining (some with usage help, some without) or mentioned somewhere here in an earlier IPPF post (of mine - again a possibly helpful hint for searches).
All binaries were built with the idea of an additional "root directory" on "/var/custom" in mind (where I usually mount my own extension image) ... some binaries rely on path names (to locate their settings or other programs) starting there. If you put such files into the root image, you still need to provide a symbolic link (at least for some of them) from a structure beneath "/var/custom" to the file(s) in your SquashFS root image. You should try all of these programs thoroughly, in front of any attempts to incorporate services (based on these files) into your usage of "modfs".