It might not be a perfect answer but it could be a big partial answer. Greece is a major gateway country for migrants trying to sneak into the European Union heading for Germany or Britain.
Greece plays an important role as a goal tender for the rest of Europe so why not get paid for its service? The Greeks could send Brussels a bill on a "cost plus" basis. All expenses paid - patrolling, interception, interning, processing and returning migrants to whence they came - along with a bounty per head of several thousand Euros.
If one side wouldn't pay I'll bet the other would - the same levy for entry into Greece and free passage across Greek borders into the rest of Europe.
Then Athens could allocate a percentage of the net to paying down their Euro Bank/IMF debt. Sounds like a plan.