EXHIBIT 10.12

AMENDMENT NO. 4

TO THE

ADVISORY AGREEMENT

This amendment no. 4 to the Advisory Agreement dated as of
November 8, 2007 (the Advisory Agreement) between KBS Real Estate Investment Trust, Inc., a Maryland corporation (the Company), and KBS Capital Advisors LLC, a Delaware limited liability company (the
Advisor), is entered as of July 31, 2008 (the Amendment). Capitalized terms used herein but not defined shall have the meaning set forth in the Advisory Agreement.

WHEREAS, upon the terms set forth in this Amendment, the Advisor has agreed to amend and restate Article 16 of the Advisory Agreement and advance funds
to the Company upon the terms set forth below.

NOW, THEREFORE, in consideration of the foregoing and of the mutual covenants and
agreements contained herein, the parties hereto agree that Article 16 of the Advisory Agreement is hereby amended and restated in its entirety as follows:

ADVANCE

Notwithstanding anything contained in Article 9 of this Agreement to the contrary, the Advisor
hereby agrees to advance funds (the Advance) to the Company equal to the amount by which the cumulative amount of distributions declared by the Company from January 1, 2006 through the period ending August 31, 2008 exceeds the
amount of the Companys funds from operations (as defined by NAREIT) from January 1, 2006 through August 31, 2008. Advisor further agrees that the Company will only be obligated to reimburse the Advisor for the Advance if and to the
extent that the Companys cumulative funds from operations for the period commencing January 1, 2006 through the date of any such reimbursement exceed the lesser of (i) the cumulative amount of any distributions declared and payable
to the Companys Stockholders as of the date of such reimbursement or (ii) an amount that is equal to a 7.0% cumulative, non-compounded, annual return on Invested Capital for the Companys Stockholders for the period from
July 18, 2006 through the date of such reimbursement. Advisor understands and agrees that no interest shall accrue on the Advance being made under this Agreement.



Signature page follows.



---

IN WITNESS WHEREOF, the parties hereto have executed this Amendment as of the date and year first above
written.





| |  |  |  |                                        |  |                                                    |  |                                                |  |                                   
| |  |  |  | -------------------------------------- |  | -------------------------------------------------- |  | ---------------------------------------------- |  | ----------------------------------
| |  |  |  | KBS REAL ESTATE INVESTMENT TRUST, INC.
| |  |  | 
| |  |  |  | By:                                    |  | /s/ Charles J. Schreiber, Jr.                     
| |  |  |  |                                        |  | Charles J. Schreiber, Jr., Chief Executive Officer
| |  | 
| |  |  |  | KBS CAPITAL ADVISORS LLC              
| |  |  | 
| |  |  |  | By:                                    |  | Schreiber Real Estate Investments, L.P., aManager 
| |  |  |  |                                       
| |  |  |  |                                        |  | By:                                                |  | Schreiber Investments, LLC, as general partner
| |  |  |  |                                        | 
| |  |  |  |                                        |  |                                                    |  | By:                                            |  | /s/ Charles J. Schreiber, Jr.     
| |  |  |  |                                        |  |                                                    |  |                                                |  | Charles J. Schreiber, Jr., Manager