LUA Buglight 2.0, second preview


LUA Buglight is a utility that helps identify “LUA bugs” in applications — application features that that fail as standard user but that work as administrator.  I work on it in my spare time, so progress has been slow.  Attached to this blog post is the second preview version of LUA Buglight 2.0.


Main changes since the previous preview:



  • Single executable:  all the helper DLLs, EXEs, etc., are self-extracted to your temp folder when you run the program.  No need to copy lots of files around.

  • For Vista:  the helper program that requires elevation is now signed, so you get the nicer elevation prompt.  The driver file for Vista is signed as well, so startup is much faster.

  • Explicit check for x86 — sorry, the current version cannot be used on 64-bit versions of Windows.

  • Various bug fixes.

Some of the improvements of LUA Buglight 2.0 over 1.0:



  • Much better Vista support

  • Streamlined UI and improved flow

  • Identifies more bugs

  • On XP, not restricted to using a local admin account to create the “this-user-as-admin” context

  • On Vista, prompts for elevation just one time per session instead of for each test

  • Log file names autogenerated with timestamp in the name to avoid accidental overwrite of previous logs.

  • User options saved to the registry.

Updated:  Attachment removed, as LUA Buglight 2.1 is now available here.

Comments (11)

  1. Miral says:

    So, when is it going to support x64?  Because my main dev machine runs x64, and I expect that’s just going to get more and more commonplace (with memory requirements going up).

    [Aaron Margosis]  To be determined.  The main challenges are 1) I need to build a 64-bit version of the Detours-based shim DLL that I inject into new target processes if they are 64-bit (not sure how complicated that will be), and 2) I need to determine reliably whether the new process being launched is a 32- or 64-bit process.  Inspecting the PE headers of the target executable is straightforward enough, but managed (.NET) apps can be marked x86 but end up running 64-bit (I need to go learn how Windows tells the difference.)  And given the limited amount of time I have to work on it, I have to decide whether it’s more important to work on that, or other functionality I want to add (like automatic generation of fixes for various problems, detection of other classes of problems, etc.)

    FWIW, both my main systems run Vista x64 too.  I do all my testing in Virtual PC x86 virtual machines (with “undo disks” enabled, to ensure clean and repeatable testing).

  2. Miral says:

    If you have a look at corflags, there are some bits in the header that tell the runtime whether the assembly can run 64-bit or not, but that seems a little fragile (you’d have to check whether the 64-bit runtime was actually installed as well).

    It’s probably easier to just use IsWow64Process (assuming you can inject after-the-fact).

    [Aaron Margosis]  I’ll have to dig into corflags and see what I can find.  The DLL has to be injected at the time of process creation.

  3. james says:

    interesting. Have been looking for a “quick” tool to debug permissions problem when I’ve got admin priveleges on xp pro and an application crashes on start, but will start fine with “run as” using a different Admin account.

    LUA buglight2 only works under a non-admin account, lol, but a limited account under xp pro cannot download zip files nor write to the C: drive.

    So I “switch user”, download it under admin, copy to non-admin desktop, switch back, run it, and “shim.dll not found”, cant read from ~tempnon-admin, nor does the Help work on LUA under these conditions so not able to access userguide/manual.

    Now I suppose I can spend hours researching why this is so, but as mentioned I want a quick tool to find out why permissions on my admin account do not work when I have full control on all objects.

    I think these kinds of tools should be quick and transparent to the user, or I’d bust out xcacls, or spend the same amount of time writing my own solution as I seem to do researching how to use other’s tools or why they don’t work.

    [Aaron Margosis]  Your system sounds pretty non-standard.  First, user accounts on XP are not prevented from downloading zip files.  You can’t put files right in the root of C:, but you can create a subfolder under C:, or put it in your user profile.  I suspect that some of the tweaks or lockdowns you’ve applied may be the reason that it’s having trouble reading DLLs or other files in your temp folder.

    The Help hasn’t been updated from the original or put back into this preview version yet.  (And the original isn’t available for download anymore.)  I hope to get another version posted with more complete information.  But really, it should all be self-explanatory! :-)  (Kidding!)

  4. Dustin Hughes says:

    I was looking forward to trying this program but the download (attachment) link is not working. It gives me "We are currently unable to serve your request."

  5. stentor says:

    re Explicit check for x86 —

    What should happen minus the check and one tried to run Buglight on x64?  The driver wouldn’t load?

    [Aaron Margosis] The x86 driver wouldn’t load, so the Buglight process would not get the necessary privileges it needs.  Furthermore, if the target app or any child processes were x64, injecting the shim DLL would fail.

    I’ve been working on a major rewrite for LUA Buglight.  When it’s done it will fully support x64 as well as Win7, and sport a totally rewritten Reporter UI.

  6. Joe says:

    How do I run this program in Windows 7.  Everytime I run it, it states ” ERROR:  LUA Buglight must be run by a member of the Administrators group in admin-approval mode.

    [Aaron Margosis]  New version of LUA Buglight is in the works that includes support for Windows 7. Sorry for the delay.

  7. EL says:

    Great blogs on LUA.  I’d downloaded the 2.0 version but the ZIP file didn’t include the guide DOC.  Where can I get it?

  8. Prakash says:

    Please release this for 64 bit.

  9. Bob says:

    Great app! All our developers runs x64 and they are the "troublemakers" on the network…

    A x64 version would be great! Keep up the good work!

    /Bob

  10. Joseph says:

    So does anyone know the steps to work this program with windows 7 from start to finish?  A simple text explanation would be great!

    [Aaron Margosis]  Ahoy all — I will be posting a version soon that supports Windows 7, as well as x64.  (x64 will be Vista and higher only — ran into problems getting it to work on XP x64.)

  11. Aaron Margosis says:

    LUA Buglight 2.1 is now released, with support for Windows 7 x86 and x64, and more:

    http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx