The scripts come directly out of the System.Web.Extensions assembly. But you can change where the scripts come from using a script reference, like this:
<asp:ScriptManager runat="server">
<Scripts>
<asp:ScriptReference Name="MicrosoftAjax.js" Path="~/scripts/MicrosoftAjax.js" />
</Scripts>
</asp:ScriptManager>
To get the script, just get the directly out of the rendered page, paste it into the address bar, and download the script.
One thing -- there's actually two versions of MicrosoftAjax.js in the assembly. A release version and a debug version. The debug version has a lot of additional script to do type checking, and is not crunched through a javascript minifier. So you can customize it easily, but the size of the script is going to be pretty big. It wasn't meant to be used in production environments. So I highly recommend you either also customize the release version (which will be very difficult due to having to work with the crunched script) or you reproduce the release version by running your custom script through the Microsoft Ajax Minifier:
http://stephenwalther.com/blog/archive/2009/10/16/using-the-new-microsoft-ajax-minifier.aspx
To get both versions just flip the debug="false" value to "true" and repeat the download step. Name it foo.js and foo.debug.js (foo being whatever you want -- MicrosoftAjax being the obvious choice!)
Also be sure and check out the new ways to change where the scripts come from in ASP.NET 4.0. Just blogged about it here:
http://weblogs.asp.net/infinitiesloop/archive/2009/11/23/asp-net-4-0-scriptmanager-improvements.aspx