There are a few ways to do this. One way is to firstly check if there are any attachments on the current task and if so use a Call Web Service control (using the StartWorkflowOnList method) to run another simple workflow that you build on the actual Workflow Task list to do a Copy To Sharepoint action. You would need to pass this workflow the TaskID from the Workflow Task List, the List Name and the Workflow you are calling (on the Workflow Task List).
Within the Workflow sitting on the Task List, you would need to have a Copy To Sharepoint action with your destination Library stipulated. I also populate the destination library with custom columns referencing the Task ID and the original List ItemID. There is also logic to rename attachments in the case of potential duplicates.
It took me some time to develop our solution, based on the fact that there were multiple parts along the workflow where attachments could be added and I thought it best to have them all dumped out to a document library. From there you can utilise a filtered List view within all your forms to display any of the relevant documents easily.
Another option that I have not tested is the following article refering to a custom action that Vadim Tabakman has developed:
I also believe there are ways to code the movement of the attachments from the task lists to the original Item as well.