It was not possible to search inside attachments as Gmail never indexed the content of attachments. But now when you enter a search query, Gmail searches inside the attachments as well.
If you want to search only messages with attachments then you can use the following syntax:
sample search query has:attachment
And, if you further want to restrict your searches to specific file types then use the following syntax:
sample search query has:attachment filename:example.txt
sample search query has:attachment filename:pdf"