Don't read this as an endorsement, but the student debt crisis has been pretty lucrative.

Some 40 million people owe about $1.3 trillion in student loan debt. It isn't pretty. But it is profitable -- depending on who or what you are. Here's a look at where a lot of the money flows, from the public sector to the private sector to academia.

1. The Debt Collectors

Since 2012, the Department of Education has issued $2.76 billion worth of contracts to about a couple dozen companies charged with recovering federal student loan debt, according to federal procurement data. These are the folks who send letters, make calls, and if deemed necessary, garnish wages and place property liens to get the job done. But the government recently accused five companies of giving borrowers false information about repayment options and loan rehabilitation. Three of the companies whose contracts were set to expire this year won't be getting any more debt collection contracts because of the government's claim. But two of the five companies had signed multi-year contract renewals before the announcement and are still working for the Department of Education, the Huffington Post reported. Those companies have received $615.7 million in federal contracts since 2012, more than 22 percent of all the federal contract dollars awarded to collection companies in that span.

One of the companies, Pioneer Credit Recovery, is owned by Navient, the nation's biggest servicer of student loans. Navient manages more than $310 billion in student loans, according to the company. The company was born last year when SallieMae split itself in two and transferred its federal loan servicing portfolio to Navient, among other operations. Just last year, Sallie Mae settled a lawsuit with the U.S. Department of Justice, which alleged the company mistreated military service members by charging excessive rates on loans they serviced.

Here's a list of the five companies fired:

Value of Federal Contracts Awarded Since 2012

Pioneer Credit Recovery - $176,472,644.75

Enterprise Recovery Systems - $154,705,761.50

Coast Professional - $122,781,173.54

West Asset Management - $86,311,175.75

National Recoveries - $75,402,607.16

Grand Total: $615,673,362.70

(Source: Federal Procurement Data)

2. The Federal Loan Servicers

Loan servicers are the middle men who process payments and provide other services, such as repayment plans and loan consolidation. Despite having multiple non-profit servicers, the government mainly relies on four servicers that have received more than $2 billion worth of contracts since 2009 to support federal loan programs, according to procurement data. The companies also earn commission on the loans they service.

Here's a breakdown of the contract money:

Value of Federal Loan Servicer Contracts Awarded Since 2009

Great Lakes Educational Loan Services - $589,796,691.62

Higher Education Assistance Agency, PA -$586,227,274.48

Nelnet Servicing - $461,082,818.96

Sallie Mae - $364,855,827.33

Grand Total: $2,001,962,612.39

(Source: Federal Procurement Data)

3. The 'Big Three' of Private Student Loans

Private loans make up just over 7 percent of the outstanding balances for the broader student loan market, which is mostly comprised of federal loan debt, according to research firm MeasureOne. These three lenders are known to dominate the industry -- let's call them the Big Three of Private Student Loans: Wells Fargo & Co manages about $12 billion in private student loan debt; Sallie Mae manages more than $9.2 billion; and Discover Financial Services manages about $8.5 billion, according to the last earning statements from the corporations.

4. The Educators

Universities are also making money off of student loans, and it's not only through their tuition and room and board. They're also investors in student loan companies.

"University endowments and teachers' pension funds are among big investors in Sallie Mae, the private lender that has been generating enormous profits thanks to soaring student debt and the climbing cost of education," reported the Huffington Post in 2013. The article described Sallie Mae as "the largest student lender and loan servicer in the country, which profits by charging relatively high interest rates on its loans and not refinancing high-rate loans after students graduate and get well-paying jobs."

"The issue becomes whether maximizing returns should be tempered by additional concerns and ethical considerations [about universities profiting like this from student loans]," education analyst Barmak Nassirian told the Huffington Post. "This form of 'double-dipping